Skip to content

Commit

Permalink
Merge pull request AudioKit#1341 from catloafsoft/travis-build
Browse files Browse the repository at this point in the history
Automated releases with Travis
  • Loading branch information
aure authored Apr 25, 2018
2 parents bf57110 + d86b9cd commit 12c4cd3
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 6 deletions.
11 changes: 10 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,18 @@ env:
- LANG=en_US.UTF-8 LC_CTYPE=en_US.UTF-8
before_install:
- pod repo update
- brew install gnu-sed
- brew install gnu-sed s3cmd
- gem install xcpretty -N
script: "./Tests/travis.sh"
notifications:
slack:
secure: Bgfiib7NP2/98fjJvW+PraQQFnj5X23+Zmvy9XqIe9NetzyNqWVN6URRFdcjvSnpah1kg2gGhIdkT5gvBT8HcP8OS6x/2lMFQsOhuA0mMoJ3tK3vhve10s3Mt8JvWqnEI3OmnDF/Yx7FN0sGiTskLYvi7jCzLY1QNqdg52VTsNI=
deploy:
provider: releases
api_key:
secure: TzjRJUQRWJIzIOB3THAgJW8XJqpVlvk7w8m1B1EpTVkF0/d3Bz8i9IYegiydLy5pSrXR7GhHwqkn/CrwBdTr0WrlyujWA4uhedAxZEwY2hJpQ5vzw9EK1UT3Uxcs0aibgWgz20FpVSPtu2HxSGTspCqrk7vdFxQFL8b1MB2SXERnBs1eYHLBDq5O8/3hNwvH1JLRyK+pUYZwty105DEGwLSnGDsivIloutcj0cNvbCW0WKf2UnYroFPyh+paex1cY1WzUPtzxm18TxV+2i3sXNHB0ANjM/br+88RjcqH8cbMj95jcHebl5qCURdH6ab4LroNMezt5HtifiPpFkKuMcXbDwrE0Bgrb8FU2iW5f8+G6N3RwRk+5tVBWhc747Iii1Zw9UEeKrx6KhypbVZaW5nknB6ixy/aol9Ne7Zru3XNqMwQBBukMRhd0TBQeGcioeqNJAzt0Q40WSWb2QWPQ7rqd7Ym3G3v7PMW49dAkrWi38hqyOjmuNCWLxMu+88/+btAugnWNJ5+FiMhXEObnlbrYwVKYgGp0fnSaUHl60ualmcaNmPHAr0YIKzwRTjl3yiQ0JpexxTimGq2R1wsbqX6OI7AVWESBpv9mLLt+6dYsLEaKexiEVdRNhHlyXTZQxM25BG/spOakatJc60DcCHOpAebCV0l+SrqLMxJhPI=
file_glob: true
skip_cleanup: true
file: Frameworks/packages/*.zip
on:
tags: true
2 changes: 1 addition & 1 deletion AudioKit.podspec.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"documentation_url": "http://audiokit.io/docs/",
"static_framework": true,
"source": {
"http": "https://files.audiokit.io/releases/4.2.4/AudioKit.framework.zip"
"http": "https://files.audiokit.io/releases/v4.2.4/AudioKit.framework.zip"
},
"summary": "Open-source audio synthesis, processing, & analysis platform.",
"platforms": {
Expand Down
8 changes: 4 additions & 4 deletions Frameworks/build_frameworks.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@ BUILD_DIR="$PWD/build"

if [ ! -f build_frameworks.sh ]; then
echo "This script needs to be run from the Frameworks folder"
exit 0
exit 0
fi

VERSION=`cat ../VERSION`
PLATFORMS=${PLATFORMS:-"iOS macOS tvOS"}

if test "$TRAVIS" = true;
if test "$TRAVIS" = true && test "$TRAVIS_TAG" = "";
then
echo "Travis detected, build #$TRAVIS_BUILD_NUMBER"
ACTIVE_ARCH=YES
Expand Down Expand Up @@ -53,8 +53,8 @@ create_universal_framework()
cp -v fix-framework.sh "${DIR}/${PROJECT_NAME}.framework/"
fi

if test "$TRAVIS" = true;
then # Only build for simulator on Travis CI
if test "$TRAVIS" = true && test "$TRAVIS_TAG" = "";
then # Only build for simulator on Travis CI, unless we're building a release
cp -v "${BUILD_DIR}/${CONFIGURATION}-$2/${PROJECT_NAME}.framework/${PROJECT_NAME}" "${DIR}/${PROJECT_NAME}.framework/"
cp -v "${BUILD_DIR}/${CONFIGURATION}-$2/${PROJECT_UI_NAME}.framework/${PROJECT_UI_NAME}" "${DIR}/${PROJECT_UI_NAME}.framework/"
cp -v "${BUILD_DIR}/${CONFIGURATION}-$2/${PROJECT_NAME}.framework/Modules/${PROJECT_NAME}.swiftmodule/"* "${DIR}/${PROJECT_NAME}.framework/Modules/${PROJECT_NAME}.swiftmodule/"
Expand Down
12 changes: 12 additions & 0 deletions Tests/travis.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,19 @@ set -o pipefail

echo "Building AudioKit Frameworks"
cd Frameworks
if test "$TRAVIS_TAG" != ""; then
if test "$AWS_ACCESS_KEY" = ""; then
echo "You must set the AWS_ACCESS_KEY and AWS_SECRET environment variables in Travis for automated builds!" >&2
exit 1
fi
echo "Deploying for release tagged $TRAVIS_TAG ..."
./build_packages.sh || exit 1
echo "Uploading CocoaPods archive to S3 ..."
s3cmd --access_key=$AWS_ACCESS_KEY --secret_key=$AWS_SECRET put packages/AudioKit.framework.zip s3://files.audiokit.io/releases/${TRAVIS_TAG}/AudioKit.framework.zip
exit
else
./build_frameworks.sh || exit 1
fi
cd ..

echo "Building iOS HelloWorld"
Expand Down

0 comments on commit 12c4cd3

Please sign in to comment.