From e4123e73e4a656c66197440efc9edda54f65cce3 Mon Sep 17 00:00:00 2001 From: Sam Richard Date: Fri, 17 Jun 2016 08:36:00 +0100 Subject: [PATCH 1/2] :new: Add Automatic Semantic Releases --- .gitignore | 1 + .travis.yml | 20 +++++++++++++++++++- package.json | 12 +++++++++--- 3 files changed, 29 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index eebf6ac..a6ca82d 100644 --- a/.gitignore +++ b/.gitignore @@ -13,6 +13,7 @@ lib-cov # Coverage directory used by tools like istanbul coverage .nyc_output +.semantic-commits.json # Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files) .grunt diff --git a/.travis.yml b/.travis.yml index 02ba969..80894a6 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,10 +1,28 @@ language: node_js node_js: - '5.7' + +######################### +## Setup +######################### +sudo: false cache: directories: - node_modules -after_success: npm run coverage + +before_script: + - npm prune + +after_success: + - npm run coverage + - npm run semantic-release + +branches: + except: + - /^v\d+\.\d+\.\d+$/ +######################### +## Notifications +######################### notifications: email: false slack: diff --git a/package.json b/package.json index 2d6fb49..e6648cb 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,5 @@ { "name": "punchcard-content-types", - "version": "0.6.0", "description": "", "main": "index.js", "keywords": [ @@ -16,7 +15,8 @@ "ava:watch": "ava --watch | tap-diff", "nyc": "nyc --all npm run ava", "start": "node ./", - "coverage": "nyc report --reporter=text-lcov | coveralls" + "coverage": "nyc report --reporter=text-lcov | coveralls", + "semantic-release": "semantic-release pre && npm publish && semantic-release post" }, "contributors": [ "Scott Nath ", @@ -24,7 +24,7 @@ ], "repository": { "type": "git", - "url": "git@github.com:punchcard-cms/punchcard-content-types.git" + "url": "https://github.com/punchcard-cms/content-types.git" }, "license": "Apache-2.0", "dependencies": { @@ -53,7 +53,9 @@ "nyc": "^6.0.0", "open-exchange-rates": "^0.3.0", "punchcard-commit-msg": "^1.0.0", + "punchcard-semantic-release": "^2.0.0", "raw-loader": "^0.5.1", + "semantic-release": "^4.3.5", "tap-diff": "^0.1.1" }, "engines": { @@ -77,5 +79,9 @@ "ghooks": { "commit-msg": "punchcard-commit-msg" } + }, + "release": { + "analyzeCommits": "punchcard-semantic-release/analyze", + "generateNotes": "punchcard-semantic-release/notes" } } From d0289dfb18d02898605b95e9f055a05a1a7ee7fd Mon Sep 17 00:00:00 2001 From: Sam Richard Date: Fri, 17 Jun 2016 08:40:04 +0100 Subject: [PATCH 2/2] :art: Remove Changelog from PR Template No longer needed as changelog is automatically generated Removes colon between resolves and issue number so it automatically closes now --- .github/PULL_REQUEST_TEMPLATE.md | 23 ++--------------------- 1 file changed, 2 insertions(+), 21 deletions(-) diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index fd4e626..b9fbe89 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -1,25 +1,6 @@ {{short description}} -**Changelog** - -```markdown -**New** - -* {{new thing}} -* {{other new thing}} - -**Changed** - -* {{change thing}} -* {{other change thing}} - -**Removed** - -* {{removed thing}} -* {{other removed thing}} -``` - --- -Resolves: # +Resolves # -`DCO 1.1 Signed-off-by: {{full name}} <{{email address}}>` \ No newline at end of file +`DCO 1.1 Signed-off-by: {{full name}} <{{email address}}>`