getpkg/gp/publish.sh
Your Name 31be41e21d
All checks were successful
Build-Test-Publish / build (linux/amd64) (push) Successful in 23s
Build-Test-Publish / build (linux/arm64) (push) Successful in 25s
Build-Test-Publish / test-install-from-scratch (linux/amd64) (push) Successful in 8s
Build-Test-Publish / test-install-from-scratch (linux/arm64) (push) Successful in 8s
'Generic Commit'
2025-06-22 14:28:18 +12:00

21 lines
619 B
Bash
Executable File

#!/bin/bash
set -euo pipefail
#set projec to the folder this script is in.
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )"
PROJECT=$(basename "$SCRIPT_DIR")
SOS_DIR="${SCRIPT_DIR}/../sos"
# run sos to upload sos
"${SOS_DIR}/sos" upload "getbin.xyz" "${SCRIPT_DIR}/${PROJECT}" "${PROJECT}:latest"
# publish the tool
GETPKG="${SCRIPT_DIR}/../getpkg/output/getpkg"
[ -f "${GETPKG}" ] || die "Failed to find getpkg"
TOOLDIR="${SCRIPT_DIR}/tool"
mkdir -p "${TOOLDIR}"
cp "${SCRIPT_DIR}/${PROJECT}" "${TOOLDIR}/${PROJECT}"
"${GETPKG}" publish "${PROJECT}" "${TOOLDIR}"
rm -rf "${TOOLDIR}"