Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

esp-rust-bin: 1.74.0.1 -> 1.75.0.0 #296

Merged
merged 1 commit into from
Jan 7, 2024
Merged

Conversation

github-actions[bot]
Copy link
Contributor

@github-actions github-actions bot commented Jan 7, 2024

This pull request was created automatically by GitHub Actions :)
https://github.com/InternetUnexplorer/nixpkgs-overlay/actions/runs/7438686804

$ nix build '.#esp-rust-bin.passthru.updateScript' && cat ./result
---
#!/nix/store/q8qq40xg2grfh9ry1d9x4g7lq4ra7n81-bash-5.2-p21/bin/bash
set -euo pipefail

export PATH="/nix/store/rzbjspmdr6x238qnpb6qrl983sdz70hx-gh-2.40.1/bin:/nix/store/xdmynnfk2f5c8z39wrh7h216lhh91bjq-jq-1.7-bin/bin:$PATH"

REPOSITORY=$(nix eval --raw .#$1.meta.homepage)
RELEASE_JSON=$(gh release view --repo "$REPOSITORY" --json tagName,assets)

VERSION=$(nix eval --raw .#$1.version)
echo "current version is '$VERSION'"

LATEST_VERSION=$(echo "$RELEASE_JSON" | jq -r '.tagName | sub("^v"; "")')
if [ "$VERSION" == "$LATEST_VERSION" ]; then
    echo "up-to-date"
    exit 0
fi

echo "updating $1: $VERSION -> $LATEST_VERSION"
SOURCES=$(jq -n '{"version": $version}' --arg version "$LATEST_VERSION")

while read -r NAME URL; do
    [[ $NAME == *.tar.xz ]] || continue
    echo "downloading '$URL'..."
    HASH=$(nix store prefetch-file "$URL" --hash-type sha256 --json | jq -r .hash)
    SOURCES=$(echo "$SOURCES" | jq '.[$name] = {url: $url, hash: $hash}' \
              --arg name "$NAME" --arg url "$URL" --arg hash "$HASH")
done <<< "$(echo "$RELEASE_JSON" | jq -r '.assets[] | "\(.name) \(.url)"')"

echo "$SOURCES" > "$1/sources.json"

@github-actions github-actions bot added automated Pull requests created by GitHub Actions package update Pull requests that update a package labels Jan 7, 2024
@github-actions github-actions bot enabled auto-merge (rebase) January 7, 2024 14:03
@github-actions github-actions bot merged commit 907495c into main Jan 7, 2024
3 checks passed
@github-actions github-actions bot deleted the auto-update/esp-rust-bin branch January 7, 2024 14:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
automated Pull requests created by GitHub Actions package update Pull requests that update a package
Projects
None yet
Development

Successfully merging this pull request may close these issues.

0 participants