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.72.1.0 -> 1.73.0.0 #245

Merged
merged 1 commit into from
Oct 15, 2023
Merged

Conversation

github-actions[bot]
Copy link
Contributor

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

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

export PATH="/nix/store/ypdxlsd3r1lb4ll5fs0w2lzqxr92j9pn-gh-2.36.0/bin:/nix/store/3lwrcxnxvfskh7m98fq0n5kqj2001ci7-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 Oct 15, 2023
@github-actions github-actions bot enabled auto-merge (rebase) October 15, 2023 14:03
@github-actions github-actions bot merged commit 1d9320a into main Oct 15, 2023
3 checks passed
@github-actions github-actions bot deleted the auto-update/esp-rust-bin branch October 15, 2023 14:07
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