Skip to content
Snippets Groups Projects
Commit c9b81ebc authored by Éloïs's avatar Éloïs
Browse files

[build] allow version format x.y.z-beta

parent eea2430e
No related branches found
No related tags found
No related merge requests found
#!/bin/bash
### Releasing
current=`grep -P "version\": \"\d+.\d+.\d+(\w*)" package.json | grep -oP "\d+.\d+.\d+(\w*)"`
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
if [[ $1 =~ ^[0-9]+.[0-9]+.[0-9]+(-(alpha|beta|rc)[0-9]*)?$ ]]; then
echo "Changing to version: $1"
# Change the version in package.json and test file
sed -i "s/version\": .*/version\": \"$1\",/g" package.json
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment