forked from RogueMaster/flipperzero-firmware-wPlugins
-
Notifications
You must be signed in to change notification settings - Fork 0
/
buildRelease.sh
executable file
·29 lines (29 loc) · 1.58 KB
/
buildRelease.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
rm -rf RM*-*-*.tgz RM*-*-*.zip .sconsign.dblite dist build assets/resources/apps assets/resources/nfc/RMProTrainedAmiibo
git pull
./fbt updater_package
DATE_VAR=`date +%m%d`
TIME_VAR=`date +%H%M`
VER_VAR=`cat scripts/version.py | grep "or \"0" | awk -F\" '{print $4}'`
HASH_VAR=`git rev-parse \`git branch -r --sort=committerdate | tail -1\` | awk '{print substr($0,1,7)}' | tail -1`
mv dist/f7-C/f7-update-RM420FAP "RM$DATE_VAR-$TIME_VAR"
zip -rq "RM$DATE_VAR-$TIME_VAR-$VER_VAR-$HASH_VAR.zip" "RM$DATE_VAR-$TIME_VAR"
tar -czf "RM$DATE_VAR-$TIME_VAR-$VER_VAR-$HASH_VAR.tgz" "RM$DATE_VAR-$TIME_VAR"
rm -rf assets/dolphin/internal/*
cp -rf .blank_files/dolphinIntBlank/* assets/dolphin/internal/
cp -rf .blank_files/animation_managerBLANK.c applications/services/desktop/animations/animation_manager.c
./fbt updater_package
mv dist/f7-C/f7-update-RM420FAP "RM$DATE_VAR-$TIME_VAR-NoAnim"
rm -rf assets/resources/dolphin/*
cp -rf .blank_files/MjK_blank_128x64 assets/resources/dolphin/
cp -rf .blank_files/manifest_None.txt assets/resources/dolphin/manifest_None.txt
cp -rf .blank_files/manifest_None.txt assets/resources/dolphin/manifest.txt
cd assets/resources
tar -cf "../../RM$DATE_VAR-$TIME_VAR-NoAnim/resources.tar" *
cd ../../
zip -rq "RM$DATE_VAR-$TIME_VAR-$VER_VAR-$HASH_VAR-NoAnim.zip" "RM$DATE_VAR-$TIME_VAR-NoAnim"
tar -czf "RM$DATE_VAR-$TIME_VAR-$VER_VAR-$HASH_VAR-NoAnim.tgz" "RM$DATE_VAR-$TIME_VAR-NoAnim"
rm -rf "RM$DATE_VAR-$TIME_VAR"
rm -rf "RM$DATE_VAR-$TIME_VAR-NoAnim"
rm -rf assets/dolphin/internal/*
git stash
echo "BUILD COMPLETED, ZIP AND TGZ GENERATED FOR RM$DATE_VAR-$TIME_VAR-$VER_VAR-$HASH_VAR"