Skip to content
Snippets Groups Projects
Select Git revision
  • 758af2e7f722d59e1b59b47dbe828aa9b92307cf
  • master default protected
  • network/gdev-800 protected
  • cgeek/issue-297-cpu
  • gdev-800-tests
  • update-docker-compose-rpc-squid-names
  • fix-252
  • 1000i100-test
  • hugo/tmp-0.9.1
  • network/gdev-803 protected
  • hugo/endpoint-gossip
  • network/gdev-802 protected
  • hugo/distance-precompute
  • network/gdev-900 protected
  • tuxmain/anonymous-tx
  • debug/podman
  • hugo/195-doc
  • hugo/195-graphql-schema
  • hugo-tmp-dockerfile-cache
  • release/client-800.2 protected
  • release/runtime-800 protected
  • gdev-900-0.10.1 protected
  • gdev-900-0.10.0 protected
  • gdev-900-0.9.2 protected
  • gdev-800-0.8.0 protected
  • gdev-900-0.9.1 protected
  • gdev-900-0.9.0 protected
  • gdev-803 protected
  • gdev-802 protected
  • runtime-801 protected
  • gdev-800 protected
  • runtime-800-bis protected
  • runtime-800 protected
  • runtime-800-backup protected
  • runtime-701 protected
  • runtime-700 protected
  • runtime-600 protected
  • runtime-500 protected
  • v0.4.1 protected
  • runtime-401 protected
  • v0.4.0 protected
41 results

service.rs

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