Files
beef/tools/bump-version.sh
bcoles c6618cd932 Tools: Remove chrome_extensions_exploitation (#2798)
* Tools: Remove chrome_extensions_exploitation

* Tools: move scripts/bump-version.sh -> tools/bump-version.sh
2023-04-03 20:01:05 +10:00

25 lines
695 B
Bash
Executable File

#!/usr/bin/env bash
if [[ -z "${1}" || -z "${2}" ]]; then
echo "Error: missing arguments"
exit 1
fi
if [[ ! -f beef || ! -f VERSION ]]; then
echo "Error: must be run from within the BeEF root directory"
exit 1
fi
echo "Updating version ${1} to ${2}"
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
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