Created
August 16, 2019 12:56
-
-
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
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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