Skip to content

Commit

Permalink
pixelfed: fix hash format in update script
Browse files Browse the repository at this point in the history
(cherry picked from commit 8dc46af)
  • Loading branch information
pacien authored and github-actions[bot] committed Jun 27, 2023
1 parent 78d6974 commit ec07d1a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pkgs/servers/web-apps/pixelfed/update.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ TARGET_VERSION_REMOTE=$(curl ${GITHUB_TOKEN:+" -u \":$GITHUB_TOKEN\""} https://a
TARGET_VERSION=${TARGET_VERSION_REMOTE:1}
PIXELFED=https://github.com/pixelfed/pixelfed/raw/$TARGET_VERSION_REMOTE
SHA256=$(nix-prefetch-url --unpack "https://github.com/pixelfed/pixelfed/archive/v$TARGET_VERSION/pixelfed.tar.gz")
SRI_HASH=$(nix hash to-sri --type sha256 "$SHA256")

if [[ "$CURRENT_VERSION" == "$TARGET_VERSION" ]]; then
echo "pixelfed is up-to-date: ${CURRENT_VERSION}"
Expand All @@ -28,7 +29,7 @@ rm composer.json composer.lock

# change version number
sed -e "s/version =.*;/version = \"$TARGET_VERSION\";/g" \
-e "s/sha256 =.*;/sha256 = \"$SHA256\";/g" \
-e "s/hash =.*;/hash = \"$SRI_HASH\";/g" \
-i ./default.nix

cd ../../../..
Expand Down

0 comments on commit ec07d1a

Please sign in to comment.