We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c8cecd7 commit ce10c09Copy full SHA for ce10c09
1 file changed
tools/bump-version.sh
@@ -0,0 +1,24 @@
1
+#!/usr/bin/env bash
2
+
3
+if [[ -z "${1}" || -z "${2}" ]]; then
4
+ echo "Error: missing arguments"
5
+ exit 1
6
+fi
7
8
+if [[ ! -f beef || ! -f VERSION ]]; then
9
+ echo "Error: must be run from within the BeEF root directory"
10
11
12
13
+echo "Updating version ${1} to ${2}"
14
15
+git checkout -b "release/${2}"
16
+sed -i '' -e "s/$1/$2/g" VERSION
17
+sed -i '' -e "s/\"version\": \"$1\"/\"version\": \"$2\"/g" package.json
18
+sed -i '' -e "s/\"version\": \"$1\"/\"version\": \"$2\"/g" package-lock.json
19
+sed -i '' -e "s/\"version\": \"$1\"/\"version\": \"$2\"/g" config.yaml
20
21
+git add VERSION package.json package-lock.json config.yaml
22
+git commit -m "Version bump ${2}"
23
+git push --set-upstream origin "release/${2}"
24
+git push
0 commit comments