diff --git a/.travis.yml b/.travis.yml index 307acf0d..16df53e4 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,36 +1,51 @@ language: objective-c branches: except: - - develop + - develop osx_image: xcode9 -xcode_workspace: speculid.xcworkspace # path to your xcodeproj folder +xcode_workspace: speculid.xcworkspace xcode_scheme: Speculid-Mac-App before_install: - - brew update - - brew install librsvg cairo - - pod repo update - - pod install +- brew update +- brew install librsvg cairo +- pod repo update +- pod install script: - - ./decrypt-certs.sh - - ./build-keychain.sh - - xcodebuild -workspace speculid.xcworkspace -scheme "CairoSVG-Flags" -derivedDataPath ./build build -configuration "Release" - - xcodebuild archive -workspace speculid.xcworkspace -scheme "Speculid-Mac-App" -configuration Release -derivedDataPath ./build -archivePath ./build/Products/Speculid.xcarchive - - xcodebuild -exportArchive -archivePath ./build/Products/Speculid.xcarchive -exportOptionsPlist ./exportOptions.plist -exportPath ./build/Products/App - - open Build/Products/App/Speculid.app - - osascript -e 'tell application "Speculid" to quit' - - Build/Products/App/Speculid.app/Contents/MacOS/Speculid examples/Assets/macOS\ AppIcon.speculid - - diff examples/shasum <(./shasum.sh) - #- xcodebuild -workspace speculid.xcworkspace -scheme Speculid test -# after_success: -# - slather -# - bash <(curl -s https://codecov.io/bash) -f cobertura.xml +- "./decrypt-certs.sh" +- "./build-keychain.sh" +- xcodebuild -workspace speculid.xcworkspace -scheme "CairoSVG-Flags" -derivedDataPath + ./build build -configuration "Release" +- xcodebuild archive -workspace speculid.xcworkspace -scheme "Speculid-Mac-App" -configuration + Release -derivedDataPath ./build -archivePath ./build/Products/Speculid.xcarchive +- xcodebuild -exportArchive -archivePath ./build/Products/Speculid.xcarchive -exportOptionsPlist + ./exportOptions.plist -exportPath ./build/Products/App +- ditto -c -k --sequesterRsrc --keepParent ./build/Products/App/Speculid.app build/Speculid.zip +- open Build/Products/App/Speculid.app +- osascript -e 'tell application "Speculid" to quit' +- diff examples/shasum <(./shasum.sh) +before_deploy: +- git config --global user.email "builds@travis-ci.com" +- git config --global user.name "Travis CI" +- export GIT_TAG=`./bin/package.sh ./build/Products/App/Speculid.app`.$TRAVIS_BUILD_NUMBER-dev +- git tag $GIT_TAG -a -m "Generated tag from TravisCI for build $TRAVIS_BUILD_NUMBER" +- git push -q https://$TAGPERM@github.com/brightdigit/speculid --tags after_failure: - - ./shasum.sh - - find "examples/Assets/." -type f \( -iname \*.icns -o -iname \*.png -o -iname \*.pdf \) -print0 | sort -z | xargs -0 shasum -a 512 +- "./shasum.sh" +- find "examples/Assets/." -type f \( -iname \*.icns -o -iname \*.png -o -iname \*.pdf + \) -print0 | sort -z | xargs -0 shasum -a 512 notifications: webhooks: urls: - - https://webhooks.gitter.im/e/f596466e5c30701b566d - on_success: change # options: [always|never|change] default: always - on_failure: always # options: [always|never|change] default: always - on_start: never # options: [always|never|change] default: always + - https://webhooks.gitter.im/e/f596466e5c30701b566d + on_success: change + on_failure: always + on_start: never +deploy: + skip_cleanup: true + provider: releases + api_key: + secure: kB1IJxdHO6n3vTU6qR4klgASWhMzZmiiKYuKppgjZ5zq/dwTma8Ls3PabZcCoo8Bb+tZVXrohLweKwqP+IjH+oydV+9qt4oh2Q6po6gS+Qj3bTMQ+KrZYc699p32JVASQsRgLkYSUQHFT1wR4R5tlGw3A+tevJFlG56tC2WV1Sw= + file: build/Speculid.zip + on: + branch: /^release\/v\d+(\.\d+)+$/ + tags: true diff --git a/bin/package.sh b/bin/package.sh index 0ab630b6..4a12a387 100755 --- a/bin/package.sh +++ b/bin/package.sh @@ -98,10 +98,9 @@ VCS_TICK_ZEROFILL=$(printf %04d $VCS_TICK) VCS_EXTRA_ZEROFILL=$(printf %03d $VCS_EXTRA) LONG_VERSION_NUMBER_SUFFIX=${VERSION_NUMBER}.${BUILD_NUMBER_ZEROFILL}${VCS_TICK_ZEROFILL}${VCS_EXTRA_ZEROFILL} echo ${LONG_VERSION_NUMBER_SUFFIX} -echo ${SHORT_VERSION_NUMBER} -ditto -c -k --sequesterRsrc --keepParent ${APP_PATH} build/Speculid.${LONG_VERSION_NUMBER_SUFFIX}.zip -ditto -c -k --sequesterRsrc --keepParent ${APP_PATH} build/Speculid.${SHORT_VERSION_NUMBER}.zip + + #FILENAME=releases/Speculid.${SHORT_VERSION_NUMBER}.zip # #APPCAST_XML_FILENAME=${SHORT_VERSION_NUMBER}.xml