From 20809fe5f6e1db4d0cd07866713d34d0aebeb426 Mon Sep 17 00:00:00 2001 From: NONPLAYT Date: Sun, 13 Nov 2022 13:35:25 +0300 Subject: [PATCH] [ci-skip] Remove scripts --- scripts/apatch.sh | 75 --------------------------------------- scripts/upstreamCommit.sh | 38 -------------------- 2 files changed, 113 deletions(-) delete mode 100644 scripts/apatch.sh delete mode 100644 scripts/upstreamCommit.sh diff --git a/scripts/apatch.sh b/scripts/apatch.sh deleted file mode 100644 index bae11d4..0000000 --- a/scripts/apatch.sh +++ /dev/null @@ -1,75 +0,0 @@ -#!/usr/bin/env bash - -gitcmd="git -c commit.gpgsign=false" - -noapply=1 -isreject=0 -if [[ $1 == "--noapplied" ]]; then - noapply=1 - shift -fi - -if [ ! -z "$1" ]; then - file="$1" -elif [ -z "$1" ] && [ -f .git/rebase-apply/patch ]; then - file=".git/rebase-apply/patch" - noapply=1 - isreject=1 -else - echo "Please specify a file" - exit 1 -fi -applied=$(echo $file | sed 's/.patch$/-applied\.patch/g') -if [ "$1" == "--reset" ]; then - $gitcmd am --abort - $gitcmd reset --hard - $gitcmd clean -f - exit 0 -fi - - -(test "$isreject" != "1" && $gitcmd am -3 $file) || ( - echo "Failures - Wiggling" - $gitcmd reset --hard - $gitcmd clean -f - errors=$($gitcmd apply --rej $file 2>&1) - echo "$errors" >> ~/patch.log - export missingfiles="" - export summaryfail="" - export summarygood="" - for i in $(find . -name \*.rej); do - base=$(echo "$i" | sed 's/.rej//g') - if [ -f "$i" ]; then - sed -e 's/^diff a\/\(.*\) b\/\(.*\)[[:space:]].*rejected.*$/--- \1\n+++ \2/' -i $i && wiggle -v -l --replace "$base" "$i" - rm "$base.porig" "$i" - else - echo "No such file: $base" - missingfiles="$missingfiles\n$base" - fi - done - for i in $($gitcmd status --porcelain | awk '{print $2}'); do - filedata=$(cat "$i") - if [ -f "$file" ] && [[ "$filedata" == *"<<<<<"* ]]; then - export summaryfail="$summaryfail\nFAILED TO APPLY: $i" - else - $gitcmd add --force "$i" - export summarygood="$summarygood\nAPPLIED CLEAN: $i" - fi - done - echo -e "$summarygood" - echo -e "$summaryfail" - if [[ "$errors" == *"No such file"* ]]; then - echo "==========================="; - echo " " - echo " MISSING FILES" - echo $(echo "$errors" | grep "No such file") - echo -e "$missingfiles" - echo " " - echo "==========================="; - fi - $gitcmd status - $gitcmd diff -) -if [[ "$noapply" != "1" ]] && [[ "$file" != *-applied.patch ]]; then - mv "$file" "$applied" -fi \ No newline at end of file diff --git a/scripts/upstreamCommit.sh b/scripts/upstreamCommit.sh deleted file mode 100644 index e4e6e35..0000000 --- a/scripts/upstreamCommit.sh +++ /dev/null @@ -1,38 +0,0 @@ -#!/usr/bin/env bash -( -set -e -PS1="$" - -function changelog() { - base=$(git ls-tree HEAD $1 | cut -d' ' -f3 | cut -f1) - cd $1 && git log --oneline ${base}...HEAD | sed -E 's/(^[0-9a-f]{8,}( SPIGOT-[0-9]{1,4},?)* |Revert ")#([0-9]+)/\1PR-\3/' -} -bukkit=$(changelog work/Bukkit) -cb=$(changelog work/CraftBukkit) -spigot=$(changelog work/Spigot) - -updated="" -logsuffix="" -if [ ! -z "$bukkit" ]; then - logsuffix="$logsuffix\n\nBukkit Changes:\n$bukkit" - updated="Bukkit" -fi -if [ ! -z "$cb" ]; then - logsuffix="$logsuffix\n\nCraftBukkit Changes:\n$cb" - if [ -z "$updated" ]; then updated="CraftBukkit"; else updated="$updated/CraftBukkit"; fi -fi -if [ ! -z "$spigot" ]; then - logsuffix="$logsuffix\n\nSpigot Changes:\n$spigot" - if [ -z "$updated" ]; then updated="Spigot"; else updated="$updated/Spigot"; fi -fi -disclaimer="Upstream has released updates that appear to apply and compile correctly.\nThis update has not been tested by PaperMC and as with ANY update, please do your own testing" - -if [ ! -z "$1" ]; then - disclaimer="$@" -fi - -log="${UP_LOG_PREFIX}Updated Upstream ($updated)\n\n${disclaimer}${logsuffix}" - -echo -e "$log" | git commit -F - - -) || exit 1 \ No newline at end of file