Skip to content

Commit

Permalink
Made status echo for no jsDelivr URLs found specific to GH assets ↞ […
Browse files Browse the repository at this point in the history
…auto-sync from `node.js/utils`]
  • Loading branch information
adamlui authored and kudo-sync-bot committed May 5, 2024
1 parent ff42462 commit c6b285e
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions gulp/utils/bump.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

# This script automates:
# >>> bump versions in manifests + READMEs >>> commit bumps 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)
# >>> build minified JS to dist/ >>> update jsDelivr URLs for GH assets in cli.min.js
# >>> commit build to Git >>> push all changes to GitHub >>> publish to npm (optional)

# Init UI colors
nc="\033[0m" # no color
Expand Down Expand Up @@ -58,20 +58,20 @@ git commit -n -m "Bumped $PACKAGE_NAME versions to $NEW_VERSION"
echo -e "${by}\nBuilding minified JS...\n${nc}"
bash utils/build.sh

# Update jsDelivr URL for global messages w/ commit hash
echo -e "${by}\nUpdating jsDelivr URL for global messages w/ commit hash...${nc}"
# 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)
if sed -i -E "s|(cdn\.jsdelivr\.net\/gh\/[^/]+\/[^@/]+)[^/]*|\1@$BUMP_HASH|g" dist/cli.min.js
then echo -e "${bw}$BUMP_HASH${nc}"
else echo "No jsDelivr URLs found in built files"
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}"
git add ./dist/*.js
git commit -n -m "Built $PACKAGE_NAME v$NEW_VERSION"

# Push changes to GiHub
# Push all changes to GiHub
echo -e "${by}\nPushing to GitHub...\n${nc}"
git push

Expand Down

0 comments on commit c6b285e

Please sign in to comment.