use custom url in builds

This commit is contained in:
Eng1n33r 2022-07-20 21:25:02 +03:00
parent d4e8ad3a72
commit 4584e7bc8d
No known key found for this signature in database
GPG key ID: 6C4C311DFD4B4AB5
3 changed files with 18 additions and 3 deletions

View file

@ -22,17 +22,20 @@ steps:
- mv dist/f7-C/* artifacts-default/ - mv dist/f7-C/* artifacts-default/
- ls -laS artifacts-default - ls -laS artifacts-default
- ls -laS artifacts-default/f7-update-${DRONE_TAG} - ls -laS artifacts-default/f7-update-${DRONE_TAG}
environment:
FBT_TOOLS_CUSTOM_LINK:
from_secret: fbt_link
- name: 'Bundle resources' - name: 'Bundle resources'
image: kramos/alpine-zip image: kramos/alpine-zip
commands: commands:
- tar czpf artifacts-default/flipper-z-any-resources-${DRONE_TAG}.tgz -C assets resources
- mkdir sd-card - mkdir sd-card
- mkdir -p sd-card/subghz/assets - mkdir -p sd-card/subghz/assets
- mkdir -p sd-card/nfc/assets - mkdir -p sd-card/nfc/assets
- mkdir -p sd-card/infrared/assets - mkdir -p sd-card/infrared/assets
- cp assets/resources/subghz/assets/universal_rf_map sd-card/subghz/assets/universal_rf_map - cp assets/resources/subghz/assets/universal_rf_map sd-card/subghz/assets/universal_rf_map
- cp assets/resources/subghz/assets/setting_user sd-card/subghz/assets/setting_user - cp assets/resources/subghz/assets/setting_user sd-card/subghz/assets/setting_user
- cp assets/resources/subghz/assets/keeloq_mfcodes sd-card/subghz/assets/keeloq_mfcodes
- cp assets/resources/nfc/assets/mf_classic_dict.nfc sd-card/nfc/assets/mf_classic_dict.nfc - cp assets/resources/nfc/assets/mf_classic_dict.nfc sd-card/nfc/assets/mf_classic_dict.nfc
- cp assets/resources/infrared/assets/tv.ir sd-card/infrared/assets/tv.ir - cp assets/resources/infrared/assets/tv.ir sd-card/infrared/assets/tv.ir
- cp assets/resources/Manifest sd-card/Manifest - cp assets/resources/Manifest sd-card/Manifest

2
fbt
View file

@ -8,10 +8,12 @@ SCONS_DEFAULT_FLAGS="-Q --warn=target-not-built";
SCRIPT_PATH="$(cd "$(dirname "$0")" && pwd -P)"; SCRIPT_PATH="$(cd "$(dirname "$0")" && pwd -P)";
if [ -z "${FBT_NOENV:-}" ]; then if [ -z "${FBT_NOENV:-}" ]; then
echo "info: FBT_NOENV is not set, using included toolchain env";
. "$SCRIPT_PATH/scripts/toolchain/fbtenv.sh"; . "$SCRIPT_PATH/scripts/toolchain/fbtenv.sh";
fi fi
if [ -z "${FBT_NO_SYNC:-}" ]; then if [ -z "${FBT_NO_SYNC:-}" ]; then
echo "info: FBT_NO_SYNC is not set, running git submodule update";
if [ ! -d "$SCRIPT_PATH/.git" ]; then if [ ! -d "$SCRIPT_PATH/.git" ]; then
echo "\".git\" directory not found, please clone repo via \"git clone --recursive\""; echo "\".git\" directory not found, please clone repo via \"git clone --recursive\"";
exit 1; exit 1;

View file

@ -11,11 +11,21 @@ check_system()
SYS_TYPE="$(uname -s)" SYS_TYPE="$(uname -s)"
if [ "$SYS_TYPE" = "Darwin" ]; then if [ "$SYS_TYPE" = "Darwin" ]; then
echo "darwin"; echo "darwin";
TOOLCHAIN_URL="https://update.flipperzero.one/builds/toolchain/gcc-arm-none-eabi-10.3-x86_64-darwin-flipper-$VER.tar.gz"; if [ -z "${FBT_TOOLS_CUSTOM_LINK:-}" ]; then
TOOLCHAIN_URL="https://update.flipperzero.one/builds/toolchain/gcc-arm-none-eabi-10.3-x86_64-darwin-flipper-$VER.tar.gz";
else
echo "info: custom toolchain link is used";
TOOLCHAIN_URL=$FBT_TOOLS_CUSTOM_LINK;
fi
TOOLCHAIN_PATH="toolchain/x86_64-darwin"; TOOLCHAIN_PATH="toolchain/x86_64-darwin";
elif [ "$SYS_TYPE" = "Linux" ]; then elif [ "$SYS_TYPE" = "Linux" ]; then
echo "linux"; echo "linux";
TOOLCHAIN_URL="https://update.flipperzero.one/builds/toolchain/gcc-arm-none-eabi-10.3-x86_64-linux-flipper-$VER.tar.gz"; if [ -z "${FBT_TOOLS_CUSTOM_LINK:-}" ]; then
TOOLCHAIN_URL="https://update.flipperzero.one/builds/toolchain/gcc-arm-none-eabi-10.3-x86_64-linux-flipper-$VER.tar.gz";
else
echo "info: custom toolchain link is used";
TOOLCHAIN_URL=$FBT_TOOLS_CUSTOM_LINK;
fi
TOOLCHAIN_PATH="toolchain/x86_64-linux"; TOOLCHAIN_PATH="toolchain/x86_64-linux";
else else
echo "unsupported."; echo "unsupported.";