nodeshift-archived/centos7-s2i-nodejs

Set up changelog and other processes for releases

lance opened this issue · 3 comments

lance commented

Use standard-version to manage changelog.md

I was not able to find a way to simply generate a CHANGELOG.md file using standard-version.

Our tags are using custom prefix: node- (node-10.15.1)
standard-version supports the custom tag prefix usage, but when configuring it, automatically generates the tag.

This is the package.json used when trying to create only the CHANGELOG.md:

{
    "repository": {
        "type": "git",
        "url": "git+https://github.com/nodeshift/centos7-s2i-nodejs.git"
    },
    "standard-version": {
        "skip": {
            "bump": true,
            "tag": true,
            "commit": true
        }
    }
}

But it is not showing the correct information about the 10x branch.

This is the package.json used with the custom tag prefix and tag creation:

{
    "name": "centos7-s2i-nodejs",
    "version": "10.15.3",
    "repository": {
        "type": "git",
        "url": "git+https://github.com/nodeshift/centos7-s2i-nodejs.git"
    },
    "standard-version": {
        "skip": {
            "bump": true
        },
        "tagPrefix": "node-"
    }
}

We need manually update the version number and when generating the change log it creates the tag
using the specified prefix but the changelog file is not showing the commit message.

~/Desktop/centos7-s2i-nodejs [standard-version10x L|✚ 2] 
13:30 $ touch foo.txt
✔ ~/Desktop/centos7-s2i-nodejs [standard-version10x L|✚ 2…1] 
13:31 $ git add .~/Desktop/centos7-s2i-nodejs [standard-version10x L|●3] 
13:31 $ git commit -m "docs: a foo bar test"
[standard-version10x 89b7d8f] docs: a foo bar test
 3 files changed, 2 insertions(+), 57 deletions(-)
 delete mode 100644 CHANGELOG.md
 create mode 100644 foo.txt
✔ ~/Desktop/centos7-s2i-nodejs [standard-version10x L|✔] 
13:31 $ standard-version 
✔ created CHANGELOG.md
✔ outputting changes to CHANGELOG.md
✔ committing CHANGELOG.md
✔ tagging release node-10.15.5
ℹ Run `git push --follow-tags origin master && npm publish` to publish
✔ ~/Desktop/centos7-s2i-nodejs [standard-version10x L|✚ 1] 
13:31 $ cat CHANGELOG.md 
# Change Log

All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.

## [10.15.5](https://github.com/nodeshift/centos7-s2i-nodejs/compare/node-10.15.4...10.15.5) (2019-02-15)~/Desktop/centos7-s2i-nodejs [standard-version10x L|✚ 1] 

When using the master branch it shows some commit messages, but I think that messages are related to some previous tags 10.12.0 and v8x

✔ ~/Desktop/centos7-s2i-nodejs [standard-version10x L|✔] 
13:34 $ cp package.json ~/
✔ ~/Desktop/centos7-s2i-nodejs [standard-version10x L|✔] 
13:34 $ git checkout master 
Switched to branch 'master'
Your branch is up to date with 'origin/master'.
✔ ~/Desktop/centos7-s2i-nodejs [master|✔] 
13:34 $ cp ~/package.json .
✔ ~/Desktop/centos7-s2i-nodejs [master|…1] 
13:34 $ standard-version 
✔ created CHANGELOG.md
✔ outputting changes to CHANGELOG.md
✔ committing CHANGELOG.md
✔ tagging release node-10.15.5
fatal: tag 'node-10.15.5' already exists

Command failed: git tag -a node-10.15.5 -m "chore(release): 10.15.5"
fatal: tag 'node-10.15.5' already exists

✘-1 ~/Desktop/centos7-s2i-nodejs [master ↑·1|…1] 
13:34 $ cat CHANGELOG.md 
# Change Log

All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.

## [10.15.5](https://github.com/nodeshift/centos7-s2i-nodejs/compare/node-9.4.0-1...10.15.5) (2019-02-15)


### Bug Fixes

* clear npm cache after all installs ([db8b853](https://github.com/nodeshift/centos7-s2i-nodejs/commit/db8b853))
* correct the image tag for 10.x ([b2e6b36](https://github.com/nodeshift/centos7-s2i-nodejs/commit/b2e6b36))
* don't exec until the very end ([d82144c](https://github.com/nodeshift/centos7-s2i-nodejs/commit/d82144c))
* don't expose docker password on cli ([670fb32](https://github.com/nodeshift/centos7-s2i-nodejs/commit/670fb32))
* ensure all files are writable AND readable ([eb57962](https://github.com/nodeshift/centos7-s2i-nodejs/commit/eb57962))
* ensure node_modules subdirs are writable at runtime ([49f374a](https://github.com/nodeshift/centos7-s2i-nodejs/commit/49f374a))
* further tweaking of runtime user permissions ([737269b](https://github.com/nodeshift/centos7-s2i-nodejs/commit/737269b))
* only install nodemon on demand ([174066a](https://github.com/nodeshift/centos7-s2i-nodejs/commit/174066a))
* remove stale imagestreams file ([3cbbd32](https://github.com/nodeshift/centos7-s2i-nodejs/commit/3cbbd32))


### Features

* add npm build if 'build' script is present ([#144](https://github.com/nodeshift/centos7-s2i-nodejs/issues/144)) ([643fa06](https://github.com/nodeshift/centos7-s2i-nodejs/commit/643fa06))
* add RHEL7 image stream and application template ([#81](https://github.com/nodeshift/centos7-s2i-nodejs/issues/81)) ([3346a1c](https://github.com/nodeshift/centos7-s2i-nodejs/commit/3346a1c))
* install dev dependencies only in DEBUG mode ([#36](https://github.com/nodeshift/centos7-s2i-nodejs/issues/36)) ([46e2e54](https://github.com/nodeshift/centos7-s2i-nodejs/commit/46e2e54))
✔ ~/Desktop/centos7-s2i-nodejs [master ↑·1|…1] 

Previous tags created:

✔ ~/Desktop/test/centos7-s2i-nodejs [master|✔] 
13:40 $ git tag -l | grep 10.12
10.12.0
node-10.12.0
node-10.12.0-1
✔ ~/Desktop/test/centos7-s2i-nodejs [master|✔] 
13:40 $ git tag -l | grep v
v8.9.4-4
v9.4.0-4

IMO would be good to have a changelog.md generation per branch, but without touch in the current release process.

Also I can't find any information related to the usage when "Releasing Branches".

Closing since this is out of date