Uname: Linux webm016.cluster127.gra.hosting.ovh.net 5.15.167-ovh-vps-grsec-zfs-classid #1 SMP Tue Sep 17 08:14:20 UTC 2024 x86_64
Software: Apache
PHP version: 7.4.33 [ PHP INFO ] PHP os: Linux
Server Ip: 54.36.31.145
Your Ip: 216.73.216.182
User: homesquasz (91404) | Group: users (100)
Safe Mode: OFF
Disable Function:
_dyuweyrj4,_dyuweyrj4r,dl

name : release.sh
#!/bin/bash

# Check if required CLI tools are available
if ! [ -x "$(command -v grunt)" ]; then
  echo "Error: grunt-cli is not installed. Please type 'npm install grunt-cli -g' to install" >&2
  exit 1
fi

# Validate arguments
versionBumpType=${1:-patch};

if [ "$versionBumpType" != "major" ] && [ "$versionBumpType" != "minor" ] && [ "$versionBumpType" != "patch" ]; then
  echo "Invalid version bump argument: ${versionBumpType}. Option must be one of the following: major, minor, patch" >&2
  exit 1
else
  echo "Publishing and bumping with ${versionBumpType} version bump"
fi

echo "Running version bump + publish script..."
echo "."
echo "."
echo "Generating /dist and push changes + tags to Github remote 'origin'"
# Checkout master branch
git checkout master
# Version bump
grunt bump-only:"$versionBumpType"
# Generate new dist
grunt prod
# Generate new index.html page
grunt template
# Force add dist contents
git add dist/* --force
# Commit new release tag
grunt bump-commit
# Push commits/tags to master branch on remote 'origin'
git push origin master:master && git push --tags

## Update Github.io page
sh ./scripts/update-gh-pages.sh

## Publish to NPM
echo "."
echo "."
echo "Publishing to NPM"
echo "."
echo "."
npm publish

# Notify script is complete
echo "."
echo "."
echo "Script complete"
echo ""
© 2026 GrazzMean