forked from flipperdevices/flipperzero-firmware
-
-
Notifications
You must be signed in to change notification settings - Fork 540
/
buildRelease.sh
executable file
·29 lines (29 loc) · 1.71 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 build/f7-firmware-C/resources/apps build/f7-firmware-C/resources/nfc/RMProTrainedAmiibo
git pull
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`
# ./fbt updater_package
# 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"
# rm -rf build/f7-firmware-C/resources/dolphin/*
cp -rf .blank_files/MjK_blank_128x64 build/f7-firmware-C/resources/dolphin/
cp -rf .blank_files/manifest_Minimal.txt build/f7-firmware-C/resources/dolphin/manifest.txt
cp -rf .blank_files/manifest_Minimal.txt build/f7-firmware-C/resources/dolphin/manifest_Minimal.txt
cp -rf .blank_files/manifest_None.txt build/f7-firmware-C/resources/dolphin/manifest_None.txt
cd build/f7-firmware-C/resources
tar -czf "../../../RM$DATE_VAR-$TIME_VAR/resources.tar.gz" *
cd ../../../
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 "RM$DATE_VAR-$TIME_VAR"
rm -rf assets/dolphin/internal/*
git stash
echo "BUILD COMPLETED, ZIP AND TGZ GENERATED FOR RM$DATE_VAR-$TIME_VAR-$VER_VAR-$HASH_VAR"