Skip to content

Commit

Permalink
added deployment feature
Browse files Browse the repository at this point in the history
  • Loading branch information
leogdion committed Nov 9, 2017
1 parent 6f95dab commit 42028b1
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 28 deletions.
65 changes: 40 additions & 25 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -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 "[email protected]"
- 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://[email protected]/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
5 changes: 2 additions & 3 deletions bin/package.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 42028b1

Please sign in to comment.