Skip to content

Instantly share code, notes, and snippets.

@hmayer
Created August 16, 2019 12:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hmayer/4ed83f9997ecf782344dc9f5cc4a7b18 to your computer and use it in GitHub Desktop.
Save hmayer/4ed83f9997ecf782344dc9f5cc4a7b18 to your computer and use it in GitHub Desktop.
Script usado por preguiçosos para incrementar a versão no arquivo VERSION
#!/bin/bash
# Este script utiliza o comando 'semver' do pacote node-semver
if [ ! -r ${PWD}/VERSION ]; then
echo -en "ERROR: File VERSION is not writable or not found\n"
exit 1
fi
NEW_VERSION=$(semver -i $(cat ${PWD}/VERSION))
echo -en "Upgrading to version ${NEW_VERSION}."
echo -en "v${NEW_VERSION}" > ${PWD}/VERSION
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment