Skip to content

Commit

Permalink
Add .travis.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
jpadilla committed Feb 16, 2016
1 parent afe9ef6 commit 00a676e
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 5 deletions.
32 changes: 32 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
language: objective-c
osx_image: xcode7.2
script: ". ./update.sh"

before_deploy:
- git config --global user.email "[email protected]"
- git config --global user.name "Build Bot"
- git checkout master
- git commit -am "Release $RELEASE_VERSION"
- git push --quiet https://[email protected]/jpadilla/redisapp master > /dev/null 2>&1
- git tag $RELEASE_VERSION
- git push --quiet --tags https://[email protected]/jpadilla/redisapp master > /dev/null 2>&1

deploy:
provider: releases
api_key: "$GITHUB_ACCESS_TOKEN"
file: "Redis.zip"
skip_cleanup: true
on:
branch: master

after_deploy:
- rm Redis.zip
- git fetch origin gh-pages:gh-pages
- git checkout gh-pages
- git add .
- git commit -am "Release $RELEASE_VERSION"
- git push --quiet https://[email protected]/jpadilla/redisapp gh-pages > /dev/null 2>&1

branches:
only:
- master
16 changes: 11 additions & 5 deletions update.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#!/usr/bin/env bash

CURR_DIR=$(pwd)

# =========================== CHECK FORCE FLAG =================================
if [ "$1" == "--force" ]; then
FORCE=true
Expand Down Expand Up @@ -51,7 +53,9 @@ tar xvzf /tmp/redis.tar.gz -C /tmp

# Compile
echo "--> Compiling..."
(cd /tmp/redis-*/; make install PREFIX="../")
cd /tmp/redis-*/
make install PREFIX="../"
cd $CURR_DIR

# move files
echo "--> Moving files to $VENDOR_DIR"
Expand All @@ -76,7 +80,7 @@ else
NEW_BUILD=1
fi

RELEASE_VERSION="${VERSION}-build.${NEW_BUILD}"
export RELEASE_VERSION="${VERSION}-build.${NEW_BUILD}"

echo " -- Update Info.plist version ${RELEASE_VERSION}"
/usr/libexec/PlistBuddy -c "Set :CFBundleVersion ${RELEASE_VERSION}" Redis/Info.plist
Expand All @@ -93,13 +97,15 @@ echo " -- Build completed!"
# =========================== RELEASE ==========================================
echo '--> Release'
echo " -- Zip"
(cd build/Release; zip -r -y ~/Desktop/Redis.zip Redis.app)
cd build/Release
zip -r -y "$CURR_DIR/Redis.zip" Redis.app
cd ../../

# Get zip file size
FILE_SIZE=$(du ~/Desktop/Redis.zip | cut -f1)
FILE_SIZE=$(du "$CURR_DIR/Redis.zip" | cut -f1)

echo " -- Create AppCast post"
rm -r ./_posts/release
rm -rf ./_posts/release
mkdir -p ./_posts/release/

echo "---
Expand Down

0 comments on commit 00a676e

Please sign in to comment.