Skip to content

Commit a35df2e

Browse files
committed
Automatically tag a new release
1 parent 03e0244 commit a35df2e

File tree

4 files changed

+14
-2
lines changed

4 files changed

+14
-2
lines changed

.npmignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
/.nycrc
99
/.travis.yml
1010
/coverage
11+
/tag-release.sh
1112
/test/.eslintrc.yaml
1213
/yarn.lock
1314
__*

CHANGELOG.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,6 @@ All notable changes to this project will be documented in this file.
44
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
55
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
66

7-
## [Unreleased]
7+
## [0.1.0] - 2018-03-12
88
### Added
9-
- Functionality to remove indenting spaces from multiline string
9+
- Initial release

package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88
"check": "yarn run lint && yarn test",
99
"lint": "eslint .",
1010
"test": "mocha test --recursive",
11+
"prepublish": "yarn run check",
12+
"postpublish": "./tag-release.sh",
1113
"coverage": "nyc yarn test"
1214
},
1315
"repository": {

tag-release.sh

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
#!/usr/bin/env bash
2+
3+
set -euo pipefail
4+
5+
RELEASE_VER=$(node -p 'JSON.parse(require("fs").readFileSync("./package.json", "utf8")).version')
6+
7+
GIT_TAG_NAME=v$RELEASE_VER
8+
git tag -a $GIT_TAG_NAME -m $GIT_TAG_NAME
9+
git push origin $GIT_TAG_NAME

0 commit comments

Comments
 (0)