-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add versionist config #33
Conversation
I'm confused because this repo seems to already be versioned, but I don't see any versionbot integration. |
Is a versionist.conf.js needed? What differences do we want from the default? Also this is versioned manually currently, it's from long before versionist existed |
You have to use a versionist config any time there's no package.json in the repo. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This also needs the CHANGELOG.md
file to be updated to use the standard header:
# Change Log
All notable changes to this project will be documented in this file
automatically by Versionist. DO NOT EDIT THIS FILE MANUALLY!
This project adheres to [Semantic Versioning](http://semver.org/).
versionist.conf.js
Outdated
parseFooterTags: true, | ||
getGitReferenceFromVersion: 'v-prefix', | ||
incrementVersion: 'semver', | ||
updateVersion: (cwd, version, cb) => { cb(); }, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's actually now a better way of doing this, removing this line and just adding the option:
editVersion: false,
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
versionist.conf.js
Outdated
module.exports = { | ||
// This setup allows the editing and parsing of footer tags to get version and type information, | ||
// as well as ensuring tags of the type 'v<major>.<minor>.<patch>' are used. | ||
// It increments in a semver compatible fashion and allows the updating of NPM package info. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
...except this particular config doesn't update NPM package info ;-)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed
versionist.conf.js
Outdated
|
||
var getAuthor = (commitHash) => { | ||
return execSync(`git show --quiet --format="%an" ${commitHash}`, { encoding: 'utf8' }).replace('\n', ''); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any reason for using this here, when the 'upstream' versionist.conf.js does:
const execSync = require('child_process').execSync;
const getAuthor = (commitHash) => {
return execSync(`git show --quiet --format="%an" ${commitHash}`, {
encoding: 'utf8'
}).replace('\n', '');
};
IMHO if any differences can be minimised, that'd be ideal.
At the moment, I'm aware of resin-base
, edge-node-manager
and leech
all using their own versionist.conf.js
files. See also product-os/versionist#84
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nope. I've just been copy/pasting this file around from repo to repo for a while now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, so I guess you were probably copy'n'pasting round an old version of a variant of versionist's versionist.conf.js
, and the 'upstream version' of versionist.conf.js
has since been updated. And I guess this will continue to be a problem for any resin.io projects that are using versionist / VersionBot but aren't using NPM, so I wonder if product-os/versionist#84 needs to be expanded into a more flexible long-term solution...?
See my suggestion in product-os/versionist#84 (comment) |
Given that we're mandating the same standards across all resin.io repos, is that something else that versionist or VersionBot could check? |
@lurch You know where the issues list is... :) |
Change-Type: patch
VersionBot failed to commit a new version to prepare a merge for the above pull request here: #33. The reason for this is: |
@hedss this is a weird error:
|
@brownjohnf I think I know what this is, the versioning doesn't have |
@brownjohnf Yep, twas the tag. Merged, all good. |
Change-Type: patch