Skip to content
Snippets Groups Projects
Commit 285a9ae7 authored by Cédric Moreau's avatar Cédric Moreau
Browse files

Add release script

parent 7f222a4d
Branches
Tags
No related merge requests found
#!/bin/bash
current=`grep -P "version\": \"\d+.\d+.\d+(\w*)" package.json | grep -oP "\d+.\d+.\d+(\w*)"`
echo "Current version: $current"
if [[ $1 =~ ^[0-9]+.[0-9]+.[0-9]+((a|b)[0-9]+)?$ ]]; then
# Change the version in package.json and test file
sed -i "s/version\": \"$current/version\": \"$1/g" package.json
# Commit
git reset HEAD
git add package.json
git commit -m "v$1"
git tag "v$1"
else
echo "Wrong version format"
fi
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment