dropshell release DEV
Some checks failed
Dropshell Test / Build_and_Test (push) Has been cancelled

This commit is contained in:
Your Name
2025-05-17 20:21:31 +12:00
parent e5aaa57259
commit 0e1ac9ddd8
3 changed files with 45 additions and 19 deletions

View File

@ -1,6 +1,10 @@
#!/bin/bash
set -e
# directory of this script
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
echo "Script directory: $SCRIPT_DIR"
# Check for GITEA_TOKEN_DEPLOY or GITEA_TOKEN
if [ -n "$GITEA_TOKEN_DEPLOY" ]; then
TOKEN="$GITEA_TOKEN_DEPLOY"
@ -11,27 +15,32 @@ else
exit 1
fi
$SCRIPT_DIR/multibuild.sh
BUILD_DIR=$SCRIPT_DIR/build
./multibuild.sh
OLD_PWD=$PWD
cd $SCRIPT_DIR
if [ ! -f "build/dropshell.amd64" ]; then
echo "build/dropshell.amd64 not found!" >&2
if [ ! -f "output/dropshell.amd64" ]; then
echo "output/dropshell.amd64 not found!" >&2
echo "Please run multibuild.sh first." >&2
exit 1
fi
if [ ! -f "build/dropshell.arm64" ]; then
echo "build/dropshell.arm64 not found!" >&2
if [ ! -f "output/dropshell.arm64" ]; then
echo "output/dropshell.arm64 not found!" >&2
echo "Please run multibuild.sh first." >&2
exit 1
fi
TAG=$(./build/dropshell.amd64 --version)
TAG=$("$SCRIPT_DIR/output/dropshell.amd64" --version)
[ -z "$TAG" ] && echo "Failed to get version from dropshell.amd64" >&2 && exit 1
echo "Publishing dropshell version $TAG"
# make sure we've commited.
git add . && git commit -m "dropshell release $TAG" && git push
git add "$SCRIPT_DIR/../" && git commit -m "dropshell release $TAG" && git push
# Find repo info from .git/config
@ -73,8 +82,10 @@ fi
# Upload binaries and install.sh
for FILE in dropshell.amd64 dropshell.arm64 install.sh server_autosetup.sh; do
if [ -f "build/$FILE" ]; then
filetoupload="build/$FILE"
if [ -f "output/$FILE" ]; then
filetoupload="output/$FILE"
elif [ -f "../$FILE" ]; then
filetoupload="../$FILE"
elif [ -f "$FILE" ]; then
filetoupload="$FILE"
else
@ -93,3 +104,5 @@ for FILE in dropshell.amd64 dropshell.arm64 install.sh server_autosetup.sh; do
done
echo "Published dropshell version $TAG to $REPO_URL (tag $TAG) with binaries."
cd $OLD_PWD