Skip to content

Instantly share code, notes, and snippets.

@jeffque
Created October 4, 2018 16:40
Show Gist options
  • Select an option

  • Save jeffque/af63b842bc3fb97008e7b9ca29fb6392 to your computer and use it in GitHub Desktop.

Select an option

Save jeffque/af63b842bc3fb97008e7b9ca29fb6392 to your computer and use it in GitHub Desktop.
Fazendo a gerência dos certificados iOS
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'
TOTALCROSS3_HOME: 'totalcross-cache/$TC_VERSION/TotalCross4'
PATH2CERTS: certs-ios/ios
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
- echo "baixar os certificados, não posso esquecer de dar shred..."
- mkdir certs-ios
- (
- cd certs-ios
- curl $URL_CERTS_IOS -s -o certs-ios.zip
- unzip -qq -n -P "${cert_ios_passwd}" certs-ios.zip
- )
- ln -vs ../certs-ios mobile/certs-ios
- fi
- (
- cd mobile
- export TOTALCROSS3_HOME=$PWD/$TOTALCROSS3_HOME
- export PATH2CERTS=$PWD/$PATH2CERTS
- 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
- )
after_script:
- (
- cd certs-ios
- shred -zu certs-ios.zip
- cd ios
- find . -type f -exec shred -zu {} \;
- rm -rf *
- )
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