Skip to content

Commit

Permalink
add version script
Browse files Browse the repository at this point in the history
  • Loading branch information
larscom committed Aug 4, 2019
1 parent deb7915 commit 76e47d9
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions version.sh
@@ -0,0 +1,21 @@
#!/bin/bash

# allowed versions
declare -a versions
versions=(patch minor major)

if [ "$1" ] && [ "$2" ]; then
# create .git directory
mkdir -p projects/ngrx-store-storagesync/.git

if [[ ! "${versions[@]}" =~ "$1" ]]; then
echo "$1 is not valid. Try one of the following: ${versions[*]}"
exit 1
fi

#update projects/ngrx-store-storagesync/package.json
npm version $1 --prefix projects/ngrx-store-storagesync -m $2
else
echo "provide version type and a commit message as argument! e.g.: ./version.sh patch \"my commit message\" "
exit 1
fi

0 comments on commit 76e47d9

Please sign in to comment.