diff --git a/dropshell-build/build.sh b/dropshell-build/build.sh index 24e3517..faafdae 100755 --- a/dropshell-build/build.sh +++ b/dropshell-build/build.sh @@ -4,5 +4,5 @@ set -euo pipefail SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )" -docker build -t gitea.jde.nz/public/dropshell-build:latest -f "${SCRIPT_DIR}/Dockerfile" "${SCRIPT_DIR}" +docker build -t gitea.jde.nz/public/dropshell-build:test -f "${SCRIPT_DIR}/Dockerfile" "${SCRIPT_DIR}" diff --git a/dropshell-build/publish.sh b/dropshell-build/publish.sh index e3b4486..c66f71a 100755 --- a/dropshell-build/publish.sh +++ b/dropshell-build/publish.sh @@ -4,8 +4,8 @@ set -euo pipefail SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )" -"${SCRIPT_DIR}/build.sh" - "${SCRIPT_DIR}/../sos/sos" upload "getbin.xyz" "dropshell-build" "${SCRIPT_DIR}/src/dropshell-build" +docker tag gitea.jde.nz/public/dropshell-build:test gitea.jde.nz/public/dropshell-build:latest + docker push gitea.jde.nz/public/dropshell-build:latest diff --git a/dropshell-build/src/dropshell-build b/dropshell-build/src/dropshell-build index 08d6730..393c7b9 100755 --- a/dropshell-build/src/dropshell-build +++ b/dropshell-build/src/dropshell-build @@ -212,10 +212,15 @@ function buildspawn() { exit 1 fi echo "Using Docker Buildchain." + TAG="latest" + if [ -n "$DROPSHELL_BUILD_TAG" ]; then + TAG=":$DROPSHELL_BUILD_TAG" + fi + echo "Using Docker Buildchain with tag: $TAG" docker run --rm \ -u "$(id -u)":"$(id -g)" \ -v "$BUILD_DIR":/app \ - gitea.jde.nz/public/dropshell-build:latest + "gitea.jde.nz/public/dropshell-build:${TAG}" else echo "Using local native buildchain" build "$BUILD_DIR" diff --git a/dropshell-build/test.sh b/dropshell-build/test.sh index 52425ef..2868114 100755 --- a/dropshell-build/test.sh +++ b/dropshell-build/test.sh @@ -6,9 +6,7 @@ SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )" echo "Testing dropshell-build" -"${SCRIPT_DIR}/build.sh" - -"${SCRIPT_DIR}/src/dropshell-build" "${SCRIPT_DIR}/test" +DROPSHELL_BUILD_TAG="test" "${SCRIPT_DIR}/src/dropshell-build" "${SCRIPT_DIR}/test" "${SCRIPT_DIR}/test/output/ipdemo.x86_64" diff --git a/sos/sos b/sos/sos index 2c4864b..fba13d6 100755 --- a/sos/sos +++ b/sos/sos @@ -21,7 +21,12 @@ Usage: Example: sos upload tools.dropshell.app file:latest ./file.txt -This will upload the file to the server, and return the download URL +This will upload the file to the server, and return the download URL. + +Environment variables: + SOS_WRITE_TOKEN: The write token to use for the upload. If not set, + the script will look in $HOME/.config/sos/write_token.txt. + EOF exit 0 }