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.73.0.0 -> 1.73.0.1 #254

Merged
merged 1 commit into from
Oct 29, 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/6683826799

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

export PATH="/nix/store/6gz5bfkyf5nxh5dxwn6illddm352iv6b-gh-2.37.0/bin:/nix/store/9i6mxk2gfi6l6p7p5l1q02hp54xfkp94-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 29, 2023
@github-actions github-actions bot enabled auto-merge (rebase) October 29, 2023 14:04
@github-actions github-actions bot merged commit fe45e88 into main Oct 29, 2023
3 checks passed
@github-actions github-actions bot deleted the auto-update/esp-rust-bin branch October 29, 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