Skip to content
Snippets Groups Projects
Select Git revision
  • e27d101a78629aa06aa1816b9d0688e7ef6d8bf9
  • main default protected
  • release/1.1
  • encrypt_comments
  • mnemonic_dewif
  • authors_rules
  • 0.14
  • rtd
  • 1.2.1 protected
  • 1.2.0 protected
  • 1.1.1 protected
  • 1.1.0 protected
  • 1.0.0 protected
  • 1.0.0rc1 protected
  • 1.0.0rc0 protected
  • 1.0.0-rc protected
  • 0.62.0 protected
  • 0.61.0 protected
  • 0.60.1 protected
  • 0.58.1 protected
  • 0.60.0 protected
  • 0.58.0 protected
  • 0.57.0 protected
  • 0.56.0 protected
  • 0.55.1 protected
  • 0.55.0 protected
  • 0.54.3 protected
  • 0.54.2 protected
28 results

peer.py

Blame
  • build-apk.sh 1.33 KiB
    #!/bin/bash
    # [[ -z $1 ]] && echo "Please choose a version." && exit 1
    
    fVersion=$(grep "version: " pubspec.yaml | awk '{ print $2 }')
    
    withPush=$1
    
    APPNAME="gecko"
    VERSION=$(awk -F '+' '{ print $1 }' <<<$fVersion)
    BUILD=$(awk -F '+' '{ print $2 }' <<<$fVersion)
    ori_app="app.apk"
    
    echo "Nom du build final: ${APPNAME}-${VERSION}+${BUILD}.apk"
    [[ $withPush == "withPush" ]] && echo "Publish after build"
    
    ## To build Rust dependancies
    # cargo br
    
    #flutter clean
    if [[ $1 == "bundle" ]]; then
    	flutter build appbundle --release --target-platform android-arm,android-arm64 --build-name $VERSION --build-number $BUILD
    else
    #	flutter build apk --release --split-per-abi --target-platform android-arm,android-arm64 --build-name $VERSION --build-number $BUILD
    	flutter build apk --release --split-per-abi --build-name $VERSION --build-number $BUILD
    #	flutter build apk --release --build-name $VERSION --build-number $BUILD
    fi
    
    if [[ -d $HOME/kDrive/Gecko-APK ]]; then
        DL="$HOME/kDrive/Gecko-APK"
    elif [[ -d $HOME/Téléchargements ]]; then
        DL="$HOME/Téléchargements"
    elif [[ -d $HOME/Downloads ]]; then
        DL="$HOME/Downloads"
    else
        DL="/tmp"
    fi
    
    appPath="$DL/${APPNAME}-${VERSION}+${BUILD}.apk"
    mv build/app/outputs/flutter-apk/$ori_app "$appPath" || exit 1
    
    [[ $withPush == "withPush" ]] && /home/poka/scripts/link/pushGecko $VERSION+$BUILD
    
    exit 0