diff --git a/.travis.yml b/.travis.yml index 3b36c79..493a57c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,18 +1,32 @@ -language: node_js +language: node_js node_js: node addons: - chrome: stable -script: -- npm run test:lint -- | - if [ $TRAVIS_PULL_REQUEST != false ] && [ $TRAVIS_SECURE_ENV_VARS == true ]; then - echo "Pull request with secure environment variables, running Sauce tests..."; - npm run test:polymer:sauce || travis_terminate 1; - else - echo "Not a pull request and/or no secure environment variables, running headless tests..."; - npm run test:polymer:local || travis_terminate 1; - fi -env: - global: - - SAUCE_USERNAME: Desire2Learn - - secure: RtWC2uMUHvox7Y/qdWd7wrxEYedg1MdnZp9aoI2jL8KP4gi/efeFhzBIjIShnv6hnkJdf7Vy+5PTwgp4q6i4HZzmIAjyEGX+J5xd8emd3yrYg2puBrKI4bE+qzjnrWsc/9tbeqbRviFZzJzLzGCz9t1H3m/USKnzU71z7M3lFlA= + chrome: stable +script: +- npm run test:lint +- | + if [ $TRAVIS_PULL_REQUEST != false ] && [ $TRAVIS_SECURE_ENV_VARS == true ]; then + echo "Pull request with secure environment variables, running Sauce tests..."; + npm run test:polymer:sauce || travis_terminate 1; + else + echo "Not a pull request and/or no secure environment variables, running headless tests..."; + npm run test:polymer:local || travis_terminate 1; + fi +- | + if [ "$TRAVIS_BRANCH" == "master" ] && [ $TRAVIS_PULL_REQUEST == false ]; then + echo "Not a Pull Request and on branch master so bumping version"; + frauci-update-version; + export TRAVIS_TAG=$(frauci-get-version) + fi +deploy: + provider: releases + api_key: "$GITHUB_RELEASE_TOKEN" + on: + tags: true +env: + global: + - OWNER_NAME=BrightspaceUI + - REPO_NAME=offscreen + - SAUCE_USERNAME: Desire2Learn + - secure: RtWC2uMUHvox7Y/qdWd7wrxEYedg1MdnZp9aoI2jL8KP4gi/efeFhzBIjIShnv6hnkJdf7Vy+5PTwgp4q6i4HZzmIAjyEGX+J5xd8emd3yrYg2puBrKI4bE+qzjnrWsc/9tbeqbRviFZzJzLzGCz9t1H3m/USKnzU71z7M3lFlA= + - secure: QZCXkJJHV+dL29b829G9Mluib5o0KcZTl6SQIZ2VhVDAndHE+B1Ng8pO4X3LFvb1qzvcjZTuoygByuDGjAhYcWRAfsghwHDs4iWG3De4Df7YDVPyMoD5qTJnqJoCq1JV5l6++RpGSN7sjcZGLQnZN7lip73vQDbN+3YeKbBl6QA= diff --git a/README.md b/README.md index df35426..3afa014 100644 --- a/README.md +++ b/README.md @@ -140,3 +140,12 @@ npm test [bower-image]: https://img.shields.io/bower/v/d2l-offscreen.svg [ci-image]: https://travis-ci.org/BrightspaceUI/offscreen.svg?branch=master [ci-url]: https://travis-ci.org/BrightspaceUI/offscreen + +## Versioning + +Commits and PR merges to master will automatically do a minor version bump which will: +* Update the version in `package.json` +* Add a tag matching the new version +* Create a github release matching the new version + +By using either **[increment major]** or **[increment patch]** notation inside your merge message, you can overwrite the default version upgrade of minor to the position of your choice. diff --git a/package.json b/package.json index 8fbbfea..0036f71 100644 --- a/package.json +++ b/package.json @@ -40,11 +40,12 @@ "eslint": "^4.15.0", "eslint-config-brightspace": "^0.4.0", "eslint-plugin-html": "^4.0.1", + "frau-ci": "^1.33.2", "polymer-cli": "^1.9.1", "sauce-connect-launcher": "^1.2.4", "wct-browser-legacy": "^1.0.1" }, - "version": "", + "version": "4.0.4", "resolutions": { "inherits": "2.0.3", "samsam": "1.1.3",