Skip to content

Commit

Permalink
Switched to using npm version for releases
Browse files Browse the repository at this point in the history
  • Loading branch information
aydrian committed Nov 10, 2016
1 parent 84830f1 commit 84f71e4
Show file tree
Hide file tree
Showing 3 changed files with 44 additions and 8 deletions.
38 changes: 38 additions & 0 deletions CONTRIBUTING.md
@@ -0,0 +1,38 @@
# Contributing to SparkPost

Transparency is one of our core values, and we encourage developers to contribute and become part of the SparkPost developer community.
## Prerequisite to contribution

Before writing code, please search for existing issues or create a new issue to confirm where your contribution fits into the roadmap.

Current milestone Pull Requests will receive priority review for merging.

## Contribution Steps
1. Fork this repository
2. Create a new branch named after the issue you’ll be fixing (include the issue number as the branch name, example: Issue in GH is #8 then the branch name should be ISSUE-8))
3. Write corresponding tests and code (only what is needed to satisfy the issue and tests please)
* Include your tests in the 'test' directory in an appropriate test file
* Write code to satisfy the tests
* Run tests using ```npm test```
5. Ensure automated tests pass
6. Submit a new Pull Request applying your feature/fix branch to the develop branch of the SparkPost client library

## Releases
If you are a collaborator, when you want release a new version, follow these steps.

*Note: This assumes you have an `upstream` remote set up to `git@github.com:SparkPost/nodemailer-sparkpost-transport.git`*

1. Make sure all the changes are merged into master
2. Make sure all changes have passed [Travis CI build][1]
3. Determine type of release. We use [Semantic Versioning](http://semver.org/).
4. Update [CHANGELOG.md](CHANGELOG.md) with release notes and commit
5. Run `npm version` command to increment `package.json` version, commit changes, tag changes, and push to upstream.
- Patch -> `npm version patch`
- Minor -> `npm version minor`
- Major -> `npm version major`
6. Once [Travis CI build][1] (from tag) has completed, make sure you're working directory is clean and run `npm publish`
while in the project root.
7. Create a new [Github Release](https://github.com/SparkPost/node-sparkpost/releases) using the new tag. Copy release
notes from the [CHANGELOG.md](CHANGELOG.md).

[1]: https://travis-ci.org/SparkPost/nodemailer-sparkpost-transport
3 changes: 1 addition & 2 deletions lib/sparkPostTransport.js
Expand Up @@ -18,7 +18,7 @@ function SparkPostTransport(options) {
this.sparkPostEmailClient = new SparkPost(this.sparkPostApiKey);

// Set any options which are valid
for(opt in options) {
for (opt in options) {
this[opt] = (options.hasOwnProperty(opt)) ? options[opt] : undefined;
}

Expand Down Expand Up @@ -160,4 +160,3 @@ function emailList(strOrLst) {
module.exports = function(options) {
return new SparkPostTransport(options);
};

11 changes: 5 additions & 6 deletions package.json
Expand Up @@ -6,7 +6,7 @@
"scripts": {
"pretest": "eslint examples lib test *.js",
"test": "mocha",
"release": "with-package git commit -am pkg.version && with-package git tag pkg.version && git push upstream && git push --tags upstream"
"postversion": "git push upstream && git push --tags upstream"
},
"repository": {
"type": "git",
Expand All @@ -23,15 +23,14 @@
},
"homepage": "https://github.com/SparkPost/nodemailer-sparkpost-transport",
"dependencies": {
"sparkpost": "^1.3.5"
"sparkpost": "^1.3.8"
},
"devDependencies": {
"chai": "^3.5.0",
"eslint": "=3.0.0",
"eslint": "^3.9.1",
"eslint-config-sparkpost": "^1.0.1",
"mocha": "^2.4.5",
"mocha": "^3.1.2",
"nodemailer": "^2.5.0",
"sinon": "^1.17.4",
"with-package": "^0.2.0"
"sinon": "^1.17.6"
}
}

0 comments on commit 84f71e4

Please sign in to comment.