You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
#!/bin/bash
# Check if required CLI tools are availableif ! [ -x "$(command -v grunt)" ]; then echo "Error: grunt-cli is not installed. Please type 'npm install grunt-cli -g' to install" >&2 exit 1fi
# Validate argumentsversionBumpType=${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 1else 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 branchgit checkout master# Version bumpgrunt bump-only:"$versionBumpType"# Generate new distgrunt prod# Generate new index.html pagegrunt template# Force add dist contentsgit add dist/* --force# Commit new release taggrunt bump-commit# Push commits/tags to master branch on remote 'origin'git push origin master:master && git push --tags
## Update Github.io pagesh ./scripts/update-gh-pages.sh
## Publish to NPMecho "."echo "."echo "Publishing to NPM"echo "."echo "."npm publish
# Notify script is completeecho "."echo "."echo "Script complete"echo ""
|