Slim release packaging
ci / test (push) Has been cancelled
ci / fuzz-smoke (push) Has been cancelled
ci / windows-client (push) Has been cancelled
ci / package-release (linux-x86_64, ubuntu-latest) (push) Has been cancelled
ci / package-release (macos-aarch64, macos-14) (push) Has been cancelled
ci / package-release (macos-x86_64, macos-13) (push) Has been cancelled
ci / package-release (windows-x86_64, windows-latest) (push) Has been cancelled
ci / remote-bench (push) Has been cancelled
ci / test (push) Has been cancelled
ci / fuzz-smoke (push) Has been cancelled
ci / windows-client (push) Has been cancelled
ci / package-release (linux-x86_64, ubuntu-latest) (push) Has been cancelled
ci / package-release (macos-aarch64, macos-14) (push) Has been cancelled
ci / package-release (macos-x86_64, macos-13) (push) Has been cancelled
ci / package-release (windows-x86_64, windows-latest) (push) Has been cancelled
ci / remote-bench (push) Has been cancelled
This commit is contained in:
@@ -10,7 +10,7 @@ fmt:
|
||||
cargo fmt
|
||||
|
||||
install:
|
||||
sh packaging/install.sh
|
||||
sh install.sh --from-current
|
||||
|
||||
package-release:
|
||||
sh scripts/package-release.sh
|
||||
|
||||
@@ -1,6 +0,0 @@
|
||||
#!/usr/bin/env sh
|
||||
set -eu
|
||||
|
||||
repo_root="$(CDPATH= cd -- "$(dirname -- "$0")/.." && pwd)"
|
||||
cd "$repo_root"
|
||||
exec sh ./install.sh --from-current "$@"
|
||||
@@ -36,6 +36,7 @@ else
|
||||
versioned_artifact="dosh-$version-$os-$arch.tar.gz"
|
||||
fi
|
||||
stage="$out_dir/stage/dosh"
|
||||
write_versioned="${DOSH_PACKAGE_VERSIONED:-0}"
|
||||
|
||||
if [ "$os" = "windows" ]; then
|
||||
cargo build --release --bin dosh-client --bin dosh-bench
|
||||
@@ -57,6 +58,30 @@ if [ -f "$stage/bin/dosh-client.exe" ]; then
|
||||
elif [ -f "$stage/bin/dosh-client" ]; then
|
||||
cp "$stage/bin/dosh-client" "$stage/bin/dosh"
|
||||
fi
|
||||
|
||||
strip_bin() {
|
||||
file="$1"
|
||||
[ -f "$file" ] || return 0
|
||||
case "$file" in
|
||||
*.exe)
|
||||
if command -v x86_64-w64-mingw32-strip >/dev/null 2>&1; then
|
||||
x86_64-w64-mingw32-strip "$file" 2>/dev/null || true
|
||||
elif command -v strip >/dev/null 2>&1; then
|
||||
strip "$file" 2>/dev/null || true
|
||||
fi
|
||||
;;
|
||||
*)
|
||||
if command -v strip >/dev/null 2>&1; then
|
||||
strip "$file" 2>/dev/null || true
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
for bin in "$stage"/bin/*; do
|
||||
strip_bin "$bin"
|
||||
done
|
||||
|
||||
printf '%s\n' "$version" >"$stage/VERSION"
|
||||
|
||||
if [ "$os" = "windows" ]; then
|
||||
@@ -71,8 +96,6 @@ if [ "$os" = "windows" ]; then
|
||||
else
|
||||
tar -C "$out_dir/stage" -czf "$out_dir/$artifact" dosh
|
||||
fi
|
||||
cp "$out_dir/$artifact" "$out_dir/$versioned_artifact"
|
||||
|
||||
write_sha256() {
|
||||
file="$1"
|
||||
if command -v sha256sum >/dev/null 2>&1; then
|
||||
@@ -85,12 +108,21 @@ write_sha256() {
|
||||
}
|
||||
|
||||
write_sha256 "$out_dir/$artifact"
|
||||
write_sha256 "$out_dir/$versioned_artifact"
|
||||
|
||||
if [ "$write_versioned" = "1" ]; then
|
||||
cp "$out_dir/$artifact" "$out_dir/$versioned_artifact"
|
||||
write_sha256 "$out_dir/$versioned_artifact"
|
||||
fi
|
||||
|
||||
printf 'Wrote:\n'
|
||||
cat <<EOF
|
||||
Wrote:
|
||||
$out_dir/$artifact
|
||||
$out_dir/$artifact.sha256
|
||||
EOF
|
||||
|
||||
if [ "$write_versioned" = "1" ]; then
|
||||
cat <<EOF
|
||||
$out_dir/$versioned_artifact
|
||||
$out_dir/$versioned_artifact.sha256
|
||||
EOF
|
||||
fi
|
||||
|
||||
@@ -41,7 +41,22 @@ if [ -z "$token" ]; then
|
||||
fi
|
||||
|
||||
if [ "$#" -eq 0 ]; then
|
||||
set -- target/dosh-release/dosh-*
|
||||
for artifact in \
|
||||
target/dosh-release/dosh-linux-*.tar.gz \
|
||||
target/dosh-release/dosh-macos-*.tar.gz \
|
||||
target/dosh-release/dosh-windows-*.zip; do
|
||||
[ -f "$artifact" ] || continue
|
||||
case "$(basename "$artifact")" in
|
||||
dosh-[0-9]*)
|
||||
continue
|
||||
;;
|
||||
esac
|
||||
if [ -f "$artifact.sha256" ]; then
|
||||
set -- "$@" "$artifact" "$artifact.sha256"
|
||||
else
|
||||
set -- "$@" "$artifact"
|
||||
fi
|
||||
done
|
||||
fi
|
||||
|
||||
api="$base/api/v1/repos/$repo"
|
||||
|
||||
Reference in New Issue
Block a user