Skip to content

fix: do not include full path to binary in .sha512 files #1108

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

Merged
merged 2 commits into from
Nov 8, 2024
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/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ on:
default: '/ipns/dist.ipfs.tech'

env:
DIST_ROOT: ${{ github.event.inputs.custom_dist_root || '/ipns/dist.ipfs.tech' }} # content root used for calculating diff to build
DIST_ROOT: ${{ github.event.inputs.dist_root || '/ipns/dist.ipfs.tech' }} # content root used for calculating diff to build
KUBO_VER: 'v0.30.0' # kubo daemon used for chunking and applying diff
CLUSTER_CTL_VER: 'v1.0.8' # ipfs-cluster-ctl used for pinning

Expand Down
12 changes: 7 additions & 5 deletions scripts/ci/sign-new-macos-releases.sh
Original file line number Diff line number Diff line change
Expand Up @@ -121,18 +121,20 @@ echo "::group::Update changed binaries in ./releases"
echo "-> Updating $PKG_NAME"
rm "$PKG_PATH"
tar -czvf "${WORK_DIR}/releases/${DIST_NAME}/${DIST_VERSION}/$PKG_NAME" -C "${WORK_DIR}/tmp/${DIST_NAME}_${DIST_VERSION}_${arch}-signed/" "${DIST_NAME}"
pushd "${PKG_ROOT}"
# calculate new hashes
NEW_CID=$(ipfs add -Qn "$PKG_PATH")
NEW_SHA512_LINE=$(gsha512sum "$PKG_PATH")
NEW_CID=$(ipfs add -Qn "$PKG_NAME")
NEW_SHA512_LINE=$(gsha512sum "$PKG_NAME")
NEW_SHA512=$(echo "$NEW_SHA512_LINE" | gawk '{ print $1; }')
echo "-> New $PKG_NAME"
echo " new CID: $NEW_CID"
echo " new SHA512: $NEW_SHA512"
# update metadata to use new hashes
echo "$NEW_CID" > "${PKG_PATH}.cid"
echo "$NEW_SHA512_LINE" > "${PKG_PATH}.sha512"
gsed -i "s/${OLD_CID}/${NEW_CID}/g; s/${OLD_SHA512}/${NEW_SHA512}/g" "${PKG_ROOT}/dist.json"
echo "$NEW_CID" > "${PKG_NAME}.cid"
echo "$NEW_SHA512_LINE" > "${PKG_NAME}.sha512"
gsed -i "s/${OLD_CID}/${NEW_CID}/g; s/${OLD_SHA512}/${NEW_SHA512}/g" "dist.json"
echo "-> Completed the update of ${arch}.tar.gz for ${DIST_NAME} ${DIST_VERSION}"
popd
done
done
echo "::endgroup::"
Loading