chore: bootstrap independent git workflow
Some checks failed
release-smoke / macos-13 / x86_64-apple-darwin (push) Has been cancelled
release-smoke / ubuntu-latest / x86_64-unknown-linux-gnu (push) Has been cancelled
release-smoke / windows-latest / x86_64-pc-windows-msvc (push) Has been cancelled

Co-Authored-By: Paperclip <noreply@paperclip.ing>
This commit is contained in:
Paperclip CTO
2026-03-26 03:49:06 +00:00
commit 7424491944
60 changed files with 7793 additions and 0 deletions

36
scripts/release/package-unix.sh Executable file
View File

@@ -0,0 +1,36 @@
#!/usr/bin/env bash
set -euo pipefail
if [ "$#" -ne 2 ]; then
echo "usage: scripts/release/package-unix.sh <target-triple> <binary-path>" >&2
exit 2
fi
target_triple="$1"
binary_path="$2"
repo_root="$(cd "$(dirname "${BASH_SOURCE[0]}")/../.." && pwd)"
version="$(node "$repo_root/scripts/release/version.mjs")"
artifact_basename="dbtool-$version-$target_triple"
artifact_dir="$repo_root/dist/$artifact_basename"
archive_path="$repo_root/dist/$artifact_basename.tar.gz"
checksum_path="$archive_path.sha256"
mkdir -p "$repo_root/dist"
rm -rf "$artifact_dir"
mkdir -p "$artifact_dir"
cp "$binary_path" "$artifact_dir/dbtool"
cp "$repo_root/README.md" "$artifact_dir/README.md"
cp "$repo_root/RELEASE_RUNBOOK.md" "$artifact_dir/RELEASE_RUNBOOK.md"
cp "$repo_root/SMOKE_RUNBOOK.md" "$artifact_dir/SMOKE_RUNBOOK.md"
tar -czf "$archive_path" -C "$repo_root/dist" "$artifact_basename"
(
cd "$repo_root/dist"
if command -v sha256sum >/dev/null 2>&1; then
sha256sum "$(basename "$archive_path")" > "$(basename "$checksum_path")"
else
shasum -a 256 "$(basename "$archive_path")" > "$(basename "$checksum_path")"
fi
)