Skip to content

Commit

Permalink
Added status echo for no jsDelivr URL in built files
Browse files Browse the repository at this point in the history
  • Loading branch information
adamlui committed May 5, 2024
1 parent c4b28d7 commit ad2ab2d
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions generate-ip/utils/bump.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

# This script automates:
# >>> bump versions in manifests + READMEs >>> commit bumps to Git
# >>> build minified JS to dist/ >>> update jsDelivr URL in cli.min.js >>> commit build to Git
# >>> build minified JS to dist/ >>> update jsDelivr URLs in cli.min.js >>> commit build to Git
# >>> push changes to GitHub >>> publish to npm (optional)

# Init UI colors
Expand Down Expand Up @@ -62,7 +62,9 @@ bash utils/build.sh
echo -e "${by}\nUpdating jsDelivr URL for global messages w/ commit hash...${nc}"
BUMP_HASH=$(git rev-parse HEAD)
if sed -i -E "s|(cdn\.jsdelivr\.net\/gh\/[^/]+\/[^@/]+)[^/]*|\1@$BUMP_HASH|" dist/cli.min.js
then echo -e "${bw}$BUMP_HASH${nc}" ; fi
then echo -e "${bw}$BUMP_HASH${nc}"
else echo "No jsDelivr URLs found in built files"
fi

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

0 comments on commit ad2ab2d

Please sign in to comment.