Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/actions/cache/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ runs:
# Hardcode version to 0.0.0 to have a stable hash when dependencies have not changed
toml set Cargo.toml package.version "0.0.0" > Cargo.toml.tmp && mv Cargo.toml.tmp Cargo.toml
cargo update --package ${GITHUB_REPOSITORY#*/}
HASH=$(cat Cargo.toml Cargo.lock flake.nix flake.lock | hashsum --sha256 --no-names)
HASH=$(cat Cargo.toml Cargo.lock flake.nix flake.lock | sha256sum | cut -d ' ' -f1)
git checkout -- Cargo.toml Cargo.lock
echo "hash=$HASH"
echo "hash=$HASH" >> $GITHUB_OUTPUT
Expand Down
2 changes: 1 addition & 1 deletion .github/actions/semver-label/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ runs:
GH_TOKEN: ${{ github.token }}
run: |
if [ -f Cargo.toml ]; then
version=$(yq '.package.version' Cargo.toml)
version=$(toml get Cargo.toml package.version --raw)
else
version=$(gh release view --json name -q '.name' 2>/dev/null || echo '0.0.0')
fi
Expand Down
2 changes: 1 addition & 1 deletion .release/action/values.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@ capture() {
capture PKG_FILENAME action
capture PKG_EXTENSION yml
repo_root="$(git rev-parse --show-toplevel)"
version="$(yq -p toml -oy '.package.version' "$repo_root/Cargo.toml")"
version="$(toml get "$repo_root/Cargo.toml" package.version --raw)"
capture PKG_VERSION "$version"
10 changes: 5 additions & 5 deletions .release/brew/values.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,14 @@ repo="${GITHUB_REPOSITORY##*/}"
capture PKG_FILENAME "$repo"
capture PKG_EXTENSION rb
capture PKG_REPO "$repo"
class="$(echo "$repo" | awk -F'-' '{for(i=1;i<=NF;i++) printf "%s%s", toupper(substr($i,1,1)), substr($i,2)}')"
class="$(echo "$repo" | gawk -F'-' '{for(i=1;i<=NF;i++) printf "%s%s", toupper(substr($i,1,1)), substr($i,2)}')"
capture PKG_CLASS "$class"
desc="$(gh repo view --json description --jq .description)"
capture PKG_DESC "$desc"
homepage="$(gh api "repos/$GITHUB_REPOSITORY" --jq .homepage)"
capture PKG_HOMEPAGE "$homepage"
repo_root="$(git rev-parse --show-toplevel)"
version="$(yq -p toml -oy '.package.version' "$repo_root/Cargo.toml")"
version="$(toml get "$repo_root/Cargo.toml" package.version --raw)"
capture PKG_VERSION "$version"
capture PKG_OWNER "${GITHUB_REPOSITORY%%/*}"

Expand All @@ -36,9 +36,9 @@ gh release download "$tag" --pattern "$pattern" --clobber
for archive in $pattern; do
echo "# $archive"
done
mac_arm_sha="$([[ -f "$repo-aarch64-apple-darwin.tar.gz" ]] && hashsum --sha256 "$repo-aarch64-apple-darwin.tar.gz" --no-names || echo "TBD")"
mac_arm_sha="$([[ -f "$repo-aarch64-apple-darwin.tar.gz" ]] && sha256sum "$repo-aarch64-apple-darwin.tar.gz" | cut -d ' ' -f1 || echo "TBD")"
capture PKG_MAC_ARM_SHA "$mac_arm_sha"
linux_arm_sha="$([[ -f "$repo-aarch64-unknown-linux-musl.tar.gz" ]] && hashsum --sha256 "$repo-aarch64-unknown-linux-musl.tar.gz" --no-names || echo "TBD")"
linux_arm_sha="$([[ -f "$repo-aarch64-unknown-linux-musl.tar.gz" ]] && sha256sum "$repo-aarch64-unknown-linux-musl.tar.gz" | cut -d ' ' -f1 || echo "TBD")"
capture PKG_LINUX_ARM_SHA "$linux_arm_sha"
linux_intel_sha="$([[ -f "$repo-x86_64-unknown-linux-musl.tar.gz" ]] && hashsum --sha256 "$repo-x86_64-unknown-linux-musl.tar.gz" --no-names || echo "TBD")"
linux_intel_sha="$([[ -f "$repo-x86_64-unknown-linux-musl.tar.gz" ]] && sha256sum "$repo-x86_64-unknown-linux-musl.tar.gz" | cut -d ' ' -f1 || echo "TBD")"
capture PKG_LINUX_INTEL_SHA "$linux_intel_sha"
2 changes: 1 addition & 1 deletion .release/nix/values.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ capture PKG_FILENAME "default"
capture PKG_EXTENSION nix
capture PKG_REPO "$repo"
repo_root="$(git rev-parse --show-toplevel)"
version="$(yq -p toml -oy '.package.version' "$repo_root/Cargo.toml")"
version="$(toml get "$repo_root/Cargo.toml" package.version --raw)"
capture PKG_VERSION "$version"
capture PKG_OWNER "${GITHUB_REPOSITORY%%/*}"
capture PKG_REV "$GITHUB_SHA"
Expand Down
2 changes: 1 addition & 1 deletion .release/render.sh
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ mock_github_actions_env() {
export GITHUB_REPOSITORY="$owner/$repo"

repo_root="$(git rev-parse --show-toplevel)"
tag="v$(yq -p toml -oy '.package.version' "$repo_root/Cargo.toml")"
tag="v$(toml get "$repo_root/Cargo.toml" package.version --raw)"
if gh api "repos/$GITHUB_REPOSITORY/git/ref/tags/$tag" &>/dev/null; then
rev="$(gh api "repos/$GITHUB_REPOSITORY/git/ref/tags/$tag" --jq '.object.sha')"
else
Expand Down
10 changes: 4 additions & 6 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -60,26 +60,24 @@
editorconfig-checker
(python313.withPackages (
ps: with ps; [
mkdocs-material
mkdocs-material # TODO: switch to zensical. Note that find-changes action is python-based, so that needs to be rewritten.
]
))
prettier
rubocop
shellcheck
gh
yq-go
ripgrep
# Everything below is required by GitHub Actions
uutils-coreutils-noprefix
coreutils
bash
git
gitMinimal # With plain 'git' perl etc. get bundled in
findutils
gnutar
curl
jq
gzip
envsubst
gawkInteractive
gawk
xz
gnugrep
];
Expand Down