Skip to content

Commit

Permalink
Merge pull request #100 from Turbo87/ci-publish
Browse files Browse the repository at this point in the history
CI: Publish releases to "ember-mocha-builds" repo
  • Loading branch information
Turbo87 authored Nov 23, 2016
2 parents 58c295f + 097e032 commit 1463e07
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 79 deletions.
8 changes: 6 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,9 @@ install:
script:
- npm test

after_success:
- "./bin/bower_build"
deploy:
provider: script
script: .travis/deploy.sh
on:
tags: true
repo: emberjs/ember-mocha
28 changes: 28 additions & 0 deletions .travis/deploy.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
#!/usr/bin/env bash

BUILDS_REPO="https://dgeb:${GH_TOKEN}@github.com/emberjs/ember-mocha-builds.git"

# Send output to /dev/null to prevent GH_TOKEN leak on error
git clone ${BUILDS_REPO} &> /dev/null
rm -rf ember-mocha-builds/*

npm run build

# Ensure that no directories within dist will be copied when script is run.
INCLUDED_FILES=`find dist -maxdepth 1 -type f`
echo -e "INCLUDED_FILES: ${INCLUDED_FILES}\n"
cp -r ${INCLUDED_FILES} ember-mocha-builds/

cd ember-mocha-builds

git config user.email "tomster@emberjs.com"
git config user.name "Tomster"

git add --all
git commit --message="Release ${TRAVIS_TAG}"
git tag "${TRAVIS_TAG}"

# Send output to /dev/null to prevent GH_TOKEN leak on error
git push --quiet --force origin master --tags &> /dev/null

echo -e "Done\n"
48 changes: 0 additions & 48 deletions bin/bower_build

This file was deleted.

29 changes: 0 additions & 29 deletions config/release.js

This file was deleted.

0 comments on commit 1463e07

Please sign in to comment.