
All checks were successful
Build-Test-Publish / build (linux/amd64) (push) Successful in 54s
Build-Test-Publish / build (linux/arm64) (push) Successful in 1m23s
Build-Test-Publish / test-install-from-scratch (linux/amd64) (push) Successful in 7s
Build-Test-Publish / test-install-from-scratch (linux/arm64) (push) Successful in 7s
34 lines
801 B
Bash
Executable File
34 lines
801 B
Bash
Executable File
#!/bin/bash
|
|
|
|
set -euo pipefail
|
|
|
|
function die() {
|
|
echo "FATAL:"
|
|
echo "$@"
|
|
exit 1
|
|
}
|
|
|
|
|
|
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )"
|
|
SOS="${SCRIPT_DIR}/../sos/sos"
|
|
[ -f "${SOS}" ] || die "Failed to find sos"
|
|
GETPKG="${SCRIPT_DIR}/../getpkg/output/getpkg"
|
|
[ -f "${GETPKG}" ] || die "Failed to find getpkg"
|
|
|
|
|
|
|
|
# run sos to upload
|
|
"${SOS}" upload "getbin.xyz" "${SCRIPT_DIR}/whatsdirty" "whatsdirty:latest"
|
|
"${SOS}" upload "getbin.xyz" "${SCRIPT_DIR}/install.sh" "whatsdirty-install:latest"
|
|
|
|
# publish the tool\
|
|
TOOLDIR="${SCRIPT_DIR}/tool"
|
|
mkdir -p "${TOOLDIR}"
|
|
cp "${SCRIPT_DIR}/whatsdirty" "${TOOLDIR}/whatsdirty"
|
|
cp "${SCRIPT_DIR}/setup_script.sh" "${TOOLDIR}/"
|
|
|
|
# publish universal tool.
|
|
"${GETPKG}" publish "whatsdirty" "${TOOLDIR}"
|
|
|
|
rm -rf "${TOOLDIR}"
|