Skip to content

Commit

Permalink
Updated deployment script (#1101)
Browse files Browse the repository at this point in the history
  • Loading branch information
AndreasBrostrom authored Dec 10, 2023
1 parent fad5279 commit 172945e
Showing 1 changed file with 11 additions and 10 deletions.
21 changes: 11 additions & 10 deletions tools/deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ set -e

VERSION_TAG=$*

mkdir release/
mkdir -p release/

sed -i "s/#define VERSION.*/#define VERSION \"${VERSION_TAG}\"/" cScripts/script_component.hpp
sed -i "s/DevBuild/${VERSION_TAG}/" tools/config.json
Expand All @@ -16,19 +16,20 @@ python3 tools/build.py --build config_debug.json --deploy
python3 tools/build.py --build config_noLoadouts.json --deploy
python3 tools/build.py --build config_noRadio.json --deploy

sed -i "s/DEVBUILD/${VERSION_TAG}/g" Compositions/*/header.sqe
sed -i "s/DEVBUILD/v${VERSION_TAG}/g" Compositions/*/header.sqe

# Make a patch release
set +e # allow fail
PREV_TAG=$(git describe --abbrev=0 --tags `git rev-list --tags --skip=1 --max-count=1`)
echo "Creating patch build for ${PREV_TAG} to ${VERSION_TAG}"
git diff --name-only ${PREV_TAG} ${VERSION_TAG} > pre_changed_file_list.txt
sed '/tools/d;/Compositions/d;/resourses/d;/^\.\(.*\)/d' pre_changed_file_list.txt > changed_file_list.txt
zip release/cScripts_PATCH_v${PREV_TAG}_to_v${VERSION_TAG}.zip -@ < changed_file_list.txt
set -e
#set +e # allow fail
#PREV_TAG=$(git describe --abbrev=0 --tags `git rev-list --tags --skip=1 --max-count=1`)
#echo "Creating patch build for ${PREV_TAG} to ${VERSION_TAG}"
#git diff --name-only ${PREV_TAG} ${VERSION_TAG} > pre_changed_file_list.txt
#sed '/tools/d;/Compositions/d;/resourses/d;/^\.\(.*\)/d' pre_changed_file_list.txt > changed_file_list.txt
#zip release/cScripts_PATCH_v${PREV_TAG}_to_v${VERSION_TAG}.zip -@ < changed_file_list.txt
#set -e

# Pack Compositions
zip release/Compositions-${VERSION_TAG}.zip -r Compositions
cd Compositions
zip ../release/Compositions-${VERSION_TAG}.zip -r .

# Disabled
#chmod +x ./tools/build_settings_config.sh
Expand Down

0 comments on commit 172945e

Please sign in to comment.