Skip to content

Instantly share code, notes, and snippets.

@jeffque
Created October 4, 2018 15:58
Show Gist options
  • Save jeffque/5610dbe6c77a3207a61628ecb077223b to your computer and use it in GitHub Desktop.
Save jeffque/5610dbe6c77a3207a61628ecb077223b to your computer and use it in GitHub Desktop.
A parte da compilação do mobile
archive-mobile:
<<: *maven-app-template
stage: archive
dependencies:
- build-mobile
cache:
paths:
- totalcross-cache
- .m2/repository
key: tc-download
variables:
TC_VERSION: '4.2.0-SNAPSHOT'
TOTALCROSS3_HOME: 'totalcross-cache/$TC_VERSION/TotalCross4'
script:
- 'do_download=false'
- if [ ! -d totalcross-cache ]; then
- echo 'não existe a pasta do cache, pode forçar o download'
- 'do_download=true'
- fi
- if [ ! -d "$TOTALCROSS3_HOME" ]; then
- echo 'não existe a pasta com a versão do download, pode fazer o download'
- 'do_download=true'
- fi
- '$do_download && bin/totalcross-downloader.sh --extract-dir=$TOTALCROSS3_HOME/.. || true'
- ln -vs ../totalcross-cache mobile/totalcross-cache
- if [ ! -e "$TOTALCROSS3_HOME/dist/vm/win32" ]; then
- echo criando o link simbólico $TOTALCROSS3_HOME/dist/vm/win32
- (
- cd "$TOTALCROSS3_HOME/dist/vm"
- ln -vs Win32 win32
- )
- fi
- (
- cd mobile
- export TOTALCROSS3_HOME=$PWD/$TOTALCROSS3_HOME
- echo "tc-home absoluto $TOTALCROSS3_HOME"
- mvn $MAVEN_CLI_OPTS clean package -DskipTests exec:java -Dexec.mainClass=br.com.softsite.GeoSalesCompile
- for dist in dist/compiled-*/install/; do
- (
- cd "$dist/"
- if [ -d win32 ]; then
- (
- cd win32
- tar -cjvf ../../SSMobile.tar.bz2 *
- )
- rm -rf win32/
- fi
- for a in */*; do
- mv -v "$a" "../${a#*/}"
- done
- rmdir -v ./*
- )
- rmdir -v "$dist/"
- done
- )
only:
- develop
- /^v(\d+\.)?(\d+\.)?(\d+)(-.*)?$/
artifacts:
paths:
- mobile/dist
expire_in: 1 week
when: on_success
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment