Created
September 25, 2024 19:11
-
-
Save brasizza/a967577550a2a2047edb47017ab2ddf2 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
FLAVOR=$1 | |
if [ -z "$FLAVOR" ]; then | |
echo "No flavor provided. Usage: $0 [rede|stone|destaxa|default]" | |
exit 1 | |
fi | |
rm -rf ./pos_package | |
rm -rf ./printer_gateway | |
rm -rf ./epoc-nfc-system | |
git rm --cached pos_package | |
rm -rf .git/modules/pos_package | |
git rm --cached epoc-nfc-system | |
rm -rf .git/modules/epoc-nfc-system | |
git rm --cached pos_package | |
rm -rf .git/modules/pos_package | |
git config --global pull.rebase false | |
git submodule add -f https://git.epoc.com.br/epoc/packages-flutter/printer_gateway.git ./printer_gateway | |
git submodule add -f https://git.epoc.com.br/epoc/packages-flutter/epoc-nfc-package.git ./epoc-nfc-system | |
git rm --cached pos_package | |
rm -rf .git/modules/pos_package | |
# Define Git URL based on the flavor passed | |
case "$FLAVOR" in | |
rede) | |
git submodule add -f https://git.epoc.com.br/epoc/packages-flutter/pos_rede.git ./pos_package | |
;; | |
stone) | |
git submodule add -f https://git.epoc.com.br/epoc/packages-flutter/pos_stone.git ./pos_package | |
;; | |
destaxa) | |
git submodule add -f https://git.epoc.com.br/epoc/packages-flutter/pos_destaxa.git ./pos_package | |
;; | |
*) | |
git submodule add -f https://git.epoc.com.br/epoc/packages-flutter/pos_stub.git ./pos_package | |
;; | |
esac | |
git submodule update --init --recursive --force | |
flutter pub get |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment