Skip to content

Commit

Permalink
Reverted file change detection to working method
Browse files Browse the repository at this point in the history
  • Loading branch information
adamlui authored May 22, 2024
1 parent 23ce5b7 commit b6e4b8c
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions node.js/utils/bump.sh
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,13 @@ bash utils/build.sh
# Update jsDelivr URLs for GitHub assets w/ commit hash
echo -e "${by}\nUpdating jsDelivr URLs for GitHub assets w/ commit hash...${nc}"
bump_hash=$(git rev-parse HEAD)
old_file=$(<dist/cli.min.js)
sed -i -E "s|(cdn\.jsdelivr\.net\/gh\/[^/]+\/[^@/\"']+)[^/\"']*|\1@$bump_hash|g" dist/cli.min.js
if [ $? -eq 0 ] ; then echo -e "${bw}$bump_hash${nc}"
else echo "No jsDelivr URLs for GH assets found in built files" ; fi
new_file=$(<dist/cli.min.js)
if [[ "$old_file" != "$new_file" ]]
then echo -e "${bw}$bump_hash${nc}"
else echo "No jsDelivr URLs for GH assets found in built files"
fi

# Commit build to Git
echo -e "${by}\nCommitting build to Git...\n${nc}"
Expand Down

0 comments on commit b6e4b8c

Please sign in to comment.