Compare commits

..

2 Commits

Author SHA1 Message Date
Ryan Heywood 083eb16b39
scripts: minor improvements 2025-02-04 22:01:56 -05:00
Ryan Heywood aa8526cda0
Release keyfork-shard v0.3.1 2025-02-04 22:01:08 -05:00
4 changed files with 13 additions and 6 deletions

2
Cargo.lock generated
View File

@ -1952,7 +1952,7 @@ dependencies = [
[[package]]
name = "keyfork-shard"
version = "0.3.0"
version = "0.3.1"
dependencies = [
"aes-gcm",
"anyhow",

View File

@ -1,6 +1,6 @@
[package]
name = "keyfork-shard"
version = "0.3.0"
version = "0.3.1"
edition = "2021"
license = "AGPL-3.0-only"

View File

@ -1,13 +1,18 @@
#!/bin/bash
set -eu
set -o pipefail
scripts_dir="$(dirname $0)"
scripts_dir="$(dirname "$0")"
python_script="$scripts_dir/generate-dependency-queue.py"
registry_url="https://git.distrust.co/api/packages/public/cargo"
search_url="${registry_url}/api/v1/crates"
cargo metadata --format-version=1 | python3 "$python_script" | while read crate version; do
cargo metadata --format-version=1 | python3 "$python_script" | while read -r crate version; do
# Verify the package does not exist
if test "${crate}" = "keyfork-tests"; then
continue
fi
if ! curl "${search_url}?q=${crate}" 2>/dev/null | jq -e "$(printf '.crates | .[] | select(.name == "%s" and .max_version == "%s")' "$crate" "$version")" >/dev/null; then
cargo publish --registry distrust -p "$crate"
fi

View File

@ -1,3 +1,4 @@
#!/bin/bash
set -eu
set -o pipefail
@ -8,8 +9,8 @@ temp_file="$(mktemp)"
cargo metadata --format-version=1 | jq -r '.packages[] | select(.source == null) | .name + " " + .manifest_path + " " + .version' > "$temp_file"
while read crate manifest_path version <&3; do
crate_path="$(dirname $manifest_path)"
while read -r crate manifest_path version <&3; do
crate_path="$(dirname "$manifest_path")"
git_log="$(git log --format='%h %s' "$LAST_REF".."$CURRENT_REF" "$crate_path")"
git_tag="$(git tag --list "$crate-v${version}")"
if test ! -z "$git_log" -a -z "$git_tag"; then
@ -22,6 +23,7 @@ while read crate manifest_path version <&3; do
echo ""
echo "# Crate: ${crate} ${version}"
} | git tag --sign "${crate}-v${version}" -F - -e
reset
echo "Making new tag: ${crate}-v${version}"
fi
done 3<"$temp_file"