Files
beef/scripts/bump-version.sh
Molese 9b277a0276 Format scripts with shfmt and fix two issues identified by shellcheck (#2303)
* install: format script with `shfmt`

Signed-off-by: molese <molese@protonmail.com>

* install: double quote `GITACTIONS` variable to prevent word splitting (SC2086)

Signed-off-by: molese <molese@protonmail.com>

* install: replace `! -z` with `-n` (SC2236)

Signed-off-by: molese <molese@protonmail.com>

* update-beef: format script with `shfmt`

Signed-off-by: molese <molese@protonmail.com>

* scripts/bump-version.sh: format script with `shfmt`

Signed-off-by: molese <molese@protonmail.com>
2022-02-18 19:01:47 +11:00

17 lines
528 B
Bash

#!/bin/bash
git checkout -b "release/$2"
sed -i '' -e "s/$1/$2/g" VERSION
sed -i '' -e "s/\"version\": \"$1\"/\"version\": \"$2\"/g" package.json
sed -i '' -e "s/\"version\": \"$1\"/\"version\": \"$2\"/g" package-lock.json
sed -i '' -e "s/\"version\": \"$1\"/\"version\": \"$2\"/g" config.yaml
if [[ "$1" != *"-pre"* ]]; then
sed -i '' -e "s/v$1/v$2/g" .github/ISSUE_TEMPLATE.md
fi
git add VERSION package.json package-lock.json config.yaml
git commit -m "Version bump $2"
git push --set-upstream origin release/$2
git push