Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build all branches on source repo #24

Open
wants to merge 3 commits into
base: 8.2.x
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions project-scaffold/.travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ cache:
- $HOME/.composer
- $HOME/.drush/cache
branches:
only:
- 8.2.x
except:
- /^[A-Z]{3,}-.*$/
env:
global:
# The Acquia site name, as used in drush aliases.
Expand All @@ -26,7 +26,6 @@ env:
# The Acquia git repository to deploy built commits to.
- [email protected]:skeletor.git
- DEPLOY_DEST=$HOME/skeletor
- DEPLOY_BRANCH=develop
services:
- memcached
- mysql
Expand Down
14 changes: 12 additions & 2 deletions project-scaffold/travis/deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,17 @@ mkdir $DEPLOY_DEST
echo "::Cloning out ${DEPLOY_REPO} into ${DEPLOY_DEST}"
git clone $DEPLOY_REPO $DEPLOY_DEST
cd $DEPLOY_DEST
git checkout $DEPLOY_BRANCH

if git rev-parse --verify origin/build-${TRAVIS_BRANCH}
then
# Checkout the existing deploy branch.
echo "::Checking out existing branch build-${TRAVIS_BRANCH}"
git checkout build-${TRAVIS_BRANCH}
else
# Create a new branch with empty history
echo "::Creating new branch build-${TRAVIS_BRANCH}"
git checkout --orphan build-${TRAVIS_BRANCH}
fi

# Create a travis-build branch off of our test commit since we're in a detached state.
cd $PROJECT_ROOT
Expand All @@ -47,4 +57,4 @@ git add --all .
git commit -m "${PULL_REQUEST_MESSAGE}

Commit ${TRAVIS_COMMIT}"
git push origin $DEPLOY_BRANCH
git push origin build-${TRAVIS_BRANCH}