partially fix scripts
This commit is contained in:
6
akarin
6
akarin
@@ -3,6 +3,7 @@
|
|||||||
# exit immediately if a command exits with a non-zero status
|
# exit immediately if a command exits with a non-zero status
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
|
basedir=$(cd "$(dirname "$0")" && pwd -P)
|
||||||
source "./scripts/functions.sh"
|
source "./scripts/functions.sh"
|
||||||
|
|
||||||
failed=0
|
failed=0
|
||||||
@@ -35,10 +36,9 @@ case "$1" in
|
|||||||
;;
|
;;
|
||||||
"jar" | "paperclip")
|
"jar" | "paperclip")
|
||||||
(
|
(
|
||||||
basedir
|
|
||||||
cd "$basedir"
|
cd "$basedir"
|
||||||
if [ "$2" != "fast" ]; then
|
if [ "$2" != "fast" ]; then
|
||||||
scripts/upstream.sh
|
scripts/upstream.sh "$basedir"
|
||||||
fi
|
fi
|
||||||
./scripts/apply.sh "$basedir"
|
./scripts/apply.sh "$basedir"
|
||||||
cd "$basedir"
|
cd "$basedir"
|
||||||
@@ -51,7 +51,7 @@ case "$1" in
|
|||||||
;;
|
;;
|
||||||
"d" | "de" | "deploy")
|
"d" | "de" | "deploy")
|
||||||
(
|
(
|
||||||
basedir
|
cd "$basedir"
|
||||||
mvn -N install
|
mvn -N install
|
||||||
cd ${FORK_NAME}-API
|
cd ${FORK_NAME}-API
|
||||||
mvn clean deploy && cd ../${FORK_NAME}-Server && mvn clean install
|
mvn clean deploy && cd ../${FORK_NAME}-Server && mvn clean install
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
1.15.2--23ee0a8a889f352889907369b58c361a1b19f7ac
|
1.15.2---
|
||||||
|
|||||||
@@ -14,25 +14,15 @@ gitcmd="git -c commit.gpgsign=false"
|
|||||||
case "$(echo "$SHELL" | sed -E 's|/usr(/local)?||g')" in
|
case "$(echo "$SHELL" | sed -E 's|/usr(/local)?||g')" in
|
||||||
"/bin/zsh")
|
"/bin/zsh")
|
||||||
RCPATH="$HOME/.zshrc"
|
RCPATH="$HOME/.zshrc"
|
||||||
SOURCE="${BASH_SOURCE[0]:-${(%):-%N}}"
|
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
RCPATH="$HOME/.bashrc"
|
RCPATH="$HOME/.bashrc"
|
||||||
if [[ -f "$HOME/.bash_aliases" ]]; then
|
if [[ -f "$HOME/.bash_aliases" ]]; then
|
||||||
RCPATH="$HOME/.bash_aliases"
|
RCPATH="$HOME/.bash_aliases"
|
||||||
fi
|
fi
|
||||||
SOURCE="${BASH_SOURCE[0]}"
|
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
while [ -h "$SOURCE" ]; do # resolve $SOURCE until the file is no longer a symlink
|
|
||||||
DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )"
|
|
||||||
SOURCE="$(readlink "$SOURCE")"
|
|
||||||
[[ "$SOURCE" != /* ]] && SOURCE="$DIR/$SOURCE" # if $SOURCE was a relative symlink, we need to resolve it relative to the path where the symlink file was located
|
|
||||||
done
|
|
||||||
SOURCE=$([[ "$SOURCE" = /* ]] && echo "$SOURCE" || echo "$PWD/${SOURCE#./}")
|
|
||||||
basedir=$(dirname "$SOURCE")
|
|
||||||
|
|
||||||
function basedir {
|
function basedir {
|
||||||
cd "$basedir"
|
cd "$basedir"
|
||||||
}
|
}
|
||||||
@@ -41,6 +31,10 @@ function paperdir {
|
|||||||
cd "$basedir/Paper"
|
cd "$basedir/Paper"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
gitcmd() {
|
||||||
|
$gitcmd "$@"
|
||||||
|
}
|
||||||
|
|
||||||
# COLOUR functions
|
# COLOUR functions
|
||||||
color() {
|
color() {
|
||||||
if [ $2 ]; then
|
if [ $2 ]; then
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ cd mc-dev
|
|||||||
|
|
||||||
# prepare to push
|
# prepare to push
|
||||||
if [ ! -d ".git" ]; then
|
if [ ! -d ".git" ]; then
|
||||||
gitcmd init
|
$gitcmd init
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# reset dev files to spigot
|
# reset dev files to spigot
|
||||||
@@ -39,6 +39,6 @@ done
|
|||||||
# push the dev project
|
# push the dev project
|
||||||
cd $basedir/mc-dev
|
cd $basedir/mc-dev
|
||||||
gitcmd add . -A
|
gitcmd add . -A
|
||||||
gitcmd commit . -m "$paperVer"
|
gitcmd commit --allow-empty . -m "$paperVer"
|
||||||
gitcmd tag -a "$paperVer" -m "$paperVer" 2>/dev/null
|
gitcmd tag -a "$paperVer" -m "$paperVer" 2>/dev/null
|
||||||
push . $MCDEV_REPO $paperVer
|
gitpush . $MCDEV_REPO $paperVer
|
||||||
|
|||||||
@@ -102,6 +102,6 @@ importLibrary com.mojang datafixerupper com/mojang/datafixers/util Either.java
|
|||||||
cd Paper/Paper-Server/
|
cd Paper/Paper-Server/
|
||||||
rm -rf nms-patches
|
rm -rf nms-patches
|
||||||
git add src -A
|
git add src -A
|
||||||
echo -e "Akarin extra mc-dev Imports\n\n$MODLOG" | git commit src -F -
|
echo -e "Akarin extra mc-dev Imports\n\n$MODLOG" | git commit --allow-empty src -F -
|
||||||
exit 0
|
exit 0
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -37,8 +37,8 @@ echo "$tag" > "$basedir"/current-paper
|
|||||||
paperdir
|
paperdir
|
||||||
|
|
||||||
function tag {
|
function tag {
|
||||||
cd $2
|
cd $1
|
||||||
if [ "$3" == "1" ]; then
|
if [ "$2" == "1" ]; then
|
||||||
git tag -d "$tag" 2>/dev/null
|
git tag -d "$tag" 2>/dev/null
|
||||||
fi
|
fi
|
||||||
echo -e "$(date)\n\n$version" | git tag -a "$tag" -F - 2>/dev/null
|
echo -e "$(date)\n\n$version" | git tag -a "$tag" -F - 2>/dev/null
|
||||||
@@ -52,8 +52,8 @@ if [ "$(cat "$basedir"/current-paper)" != "$tag" ]; then
|
|||||||
forcetag=1
|
forcetag=1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
tag Paper-API $forcetag
|
tag "$basedir"/Paper/Paper-API $forcetag
|
||||||
tag Paper-Server $forcetag
|
tag "$basedir"/Paper/Paper-Server $forcetag
|
||||||
|
|
||||||
push Paper-API $PAPER_API_REPO $tag
|
gitpush "$basedir"/Paper/Paper-API $PAPER_API_REPO $tag
|
||||||
push Paper-Server $PAPER_SERVER_REPO $tag
|
gitpush "$basedir"/Paper/Paper-Server $PAPER_SERVER_REPO $tag
|
||||||
|
|||||||
Reference in New Issue
Block a user