diff --git a/.travis.yml b/.travis.yml index dd7fb49255..295f7452a4 100644 --- a/.travis.yml +++ b/.travis.yml @@ -17,10 +17,6 @@ jobs: secure: wOxnxRRtCSxAS88DpUGBjx4ktYo4UQVIAiAozo/AfbyaENuboQJ1THB1CZDRSHzERt7A62/2IB3mRjFj/PyghtYH1CiLojzE5qHSorGimjIzR2eBW2KSWUfBHe8beE5flo3yzh7HQ39yGO4cjY0jvr2dIaYHyU6QkdYPWpG1EN/TkPr4ZEaXAS8zWAzoi3+b4Ya+iHcr1wArblbykYzVuh2tmnJRNHWUdJmZg30965hb/jg8VdpeHQHRHttYdATfq/f09z6BLBOrwcyidE2o8R7s0QOVagnsisTb+EnsUTduueokRQZY1Een70+F0DJPubQ84/eVTxdBmA0vEess1NboBhHKG9Kd3Xbzg3+OlvE84XRrDBvI6AXwgSj40VsYmtNFTJqJCz/ad1LMW5BK6PNTVCIf9CbthZuYwRX9hNwWjoiauGzyh9Z8sfIxXU3pgdIDNtfk+hEjp2p4BqDwcrZ9myjKKDw90y8pxd9ZELEY5nxiIAbfLT1wNVoByNiqHykLOxQurYT7Zj1KefC4UPqRvcIv8VuaGDHpEqz0UW7EfOC7n0QH7vCLMxztXcyrOpxrDCvBGwk2sgK6+vImkPyb1iC29EuOTux1URtot4BK0YgyDl71PpjEVJIYgBXHCh2tW/LGtC7cuw7vMh+PhnIAP8U0Pw65LYteh+WrlDM= on: tags: true - - provider: script - script: bash .travis/pu.sh - on: - tags: true stages: - name: test if: tag IS NOT present diff --git a/.travis/pu.sh b/.travis/pu.sh deleted file mode 100644 index 1a89b2ec52..0000000000 --- a/.travis/pu.sh +++ /dev/null @@ -1,39 +0,0 @@ -#!/bin/sh - -setup_git() { - # Set the user name and email to match the API token holder - # This will make sure the git commits will have the correct photo - # and the user gets the credit for a checkin - git config --global user.email "bameyrick@gmail.com" - git config --global user.name "Ben Meyrick" - git config --global push.default matching - - # Get the credentials from a file - git config credential.helper "store --file=.git/credentials" - - # This associates the API Key with the account - echo "https://${GITHUB_API_KEY}:@github.com" > .git/credentials -} - -make_version() { - local build_head=$(git rev-parse HEAD) - - git config --replace-all remote.origin.fetch +refs/heads/*:refs/remotes/origin/* - git fetch - git fetch --tags - - # create the tacking branches - for branch in $(git branch -r|grep -v HEAD) ; do - git checkout -qf ${branch#origin/} - done - - git checkout master - - # %s is the placeholder for the created tag - npm version $TRAVIS_BRANCH --allow-same-version -m "chore - release version %s [skip ci]" --allow-empty - - git push origin master -} - -setup_git -make_version diff --git a/docs/automatic-npm-releasing.md b/docs/automatic-npm-releasing.md index 059f0ae36e..b14fcb0ff8 100644 --- a/docs/automatic-npm-releasing.md +++ b/docs/automatic-npm-releasing.md @@ -1,16 +1,11 @@ # Automatic npm releasing -When you create a release (and a tag is created) a Travis build will kick off and start building a npm bundle which will be deployed to npm. The task will also update the version value in the `package.json` on master automatically. +When you create a release (and a tag is created) a Travis build will kick off and start building a npm bundle which will be deployed to npm. -Currently the deploy to npm and git commits are deployed/pushed using API keys for Ben Meyrick's (`bameyrick@gmail.com`) GitHub account. If these need changing there are some prerequisites: +Currently the deployment to npm is done using API keys for Ben Meyrick's (`bameyrick@gmail.com`) npm account. If these need changing there are some prerequisites: ### npm account - You must be a collaborator on the @ons/design-system package - You may have 2FA enabled but only for authentication - The API token **must** be encrypted using the Travis CLI - -### GitHub account - -- You must be an administrator of the repository -- The branch protection rules for `master` should be set to **not** apply to administrators, or Travis won't be able to update the package.json version with the latest tag