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

@damassi => Add semantic-release #521

Merged
merged 8 commits into from Feb 16, 2018

Conversation

Projects
None yet
4 participants
@eessex
Copy link
Member

eessex commented Feb 14, 2018

  • Adds semantic-release package
  • Adds custom commit message releaseRules to package.json in the Ember standard
  • Runs semantic-release after tests pass on master branch
  • Updates readme to include explanation and examples for commit formats.

GH_TOKEN has also been added to reaction on Circle CI (npm token was already present)

@eessex eessex requested a review from damassi Feb 14, 2018

@@ -27,6 +27,9 @@ test:
- yarn test -- --runInBand

deployment:
release:
branch: master
- yarn run semantic-release

This comment has been minimized.

@damassi

damassi Feb 14, 2018

Member

I think there is some legacy stuff around here that relates to legacy deployment process. Once we've verified that this works we should make sure to remove that and update README.

This comment has been minimized.

@eessex

eessex Feb 14, 2018

Member

For sure!

@damassi

This comment has been minimized.

Copy link
Member

damassi commented Feb 14, 2018

Talked with @eessex and we're going to setup a test repo to give the process a spin and figure out what we need and then come back here.

@eessex

This comment has been minimized.

Copy link
Member

eessex commented Feb 16, 2018

After merging conflicts, 17K lines were added to this PR -- any idea where these came from?

@orta

This comment has been minimized.

Copy link
Member

orta commented Feb 16, 2018

It looks like they came from the #522 change - I think you git add .'d all the old files, run find . -name __generated__ | xargs rm -rf, them yarn relay and then amend your commit 👍

@eessex eessex force-pushed the eessex:semantic-release branch from 4dcfa14 to 820c1b9 Feb 16, 2018

@eessex eessex changed the title [WIP] Add semantic-release @damassi => Add semantic-release Feb 16, 2018

@@ -1,6 +1,6 @@
{
"name": "@artsy/reaction-force",
"version": "0.23.1",
"version": "0.0.0-development",

This comment has been minimized.

@damassi

damassi Feb 16, 2018

Member

Will this account for existing packages that have already been published to NPM? Does it determine from there that the current release is 0.23.1 and update accordingly?

This comment has been minimized.

@eessex

eessex Feb 16, 2018

Member

Yes, it should fetch the version number from the existing package on npm. This version number is a placeholder and will always read 0.0.0.

This comment has been minimized.

@eessex

eessex Feb 16, 2018

Member

When merging, the build on Circle will log which commits trigger changes, as well as the new version number.

This comment has been minimized.

@damassi

damassi Feb 16, 2018

Member

Sweet, just wanted to double check 👍

This comment has been minimized.

@eessex

eessex Feb 16, 2018

Member

Also wanted to note it looks like this version number is being overwritten when I push a commit, but don't see where this is being set.

{"tag": "FEATURE", "release": "minor"},
{"tag": "BREAKING", "release": "major"}
]
}

This comment has been minimized.

@damassi
README.md Outdated
```

[Valid tags](https://github.com/artsy/reaction/blob/master/package.json#L175) for release include DOC, FIX (patch), FEATURE (minor), and BREAKING (major). Commits that do not adhere to this convention will not trigger an NPM release.

This comment has been minimized.

@damassi

damassi Feb 16, 2018

Member

What do you think about FIX vs PATCH as being the primary trigger? I always associate FIX with "BUGFIX" rathar than a minor change.

This comment has been minimized.

@eessex

eessex Feb 16, 2018

Member

Open to either, we can also add both or additional tags.

This comment has been minimized.

@damassi

damassi Feb 16, 2018

Member

Yeah, lets go ahead and associate PATCH and FIX with a minor release

README.md Outdated
##### Example Patch Release
```
[FIX onboarding]: increase plus-button size
```

This comment has been minimized.

@damassi

damassi Feb 16, 2018

Member

And update with additional example so that its clear:

[FIX onboarding] Modal does not open
[PATCH] Bump version 

This comment has been minimized.

@damassi

damassi Feb 16, 2018

Member

Also, can you remove the : from the docs so that its clear that this syntax is not required?

@eessex eessex force-pushed the eessex:semantic-release branch from 89fb37c to f0056e0 Feb 16, 2018

@damassi

This comment has been minimized.

Copy link
Member

damassi commented Feb 16, 2018

This looks good to me -- @orta / @alloy, thoughts? Otherwise 👍

@orta

This comment has been minimized.

Copy link
Member

orta commented Feb 16, 2018

Have a think if there's a peril rule that could remind you about adding [FIX] or [PATCH] to commits

@damassi

This comment has been minimized.

Copy link
Member

damassi commented Feb 16, 2018

@orta - what I'm thinking is that those should only be added when a release is desired, though @eessex and I went back and forth about whether every commit should be a release. I'm in the camp that for a project like Reaction it should be targeted and selective. For example, there could be many commits in a PR that has nothing to do with a release, or there could be many commits and then the last one is tagged signalling a release, or the whole thing could be squashed into one commit with a tag. But I think it should be conventional rather than required. Thoughts? Maybe a danger warning? But even then, i think having our README up to date in terms of how to release is sufficient -- a git commit --allow-empty -m '[PATCH] would be enough.

@alloy

This comment has been minimized.

Copy link
Member

alloy commented Feb 16, 2018

I like it 👍

I like that you still need to trigger a release, the future will tell us wether or not people in practice run into issues with that.

@damassi

This comment has been minimized.

Copy link
Member

damassi commented Feb 16, 2018

Alright, gonna merge. Thanks for diving into this new area @eessex, will def help keep things efficient 👍

@damassi damassi merged commit 01910a9 into artsy:master Feb 16, 2018

1 check passed

ci/circleci Your tests passed on CircleCI!
Details
@orta

This comment has been minimized.

Copy link
Member

orta commented Feb 16, 2018

Yeah, I like the idea 👍

@orta

This comment has been minimized.

Copy link
Member

orta commented Feb 16, 2018

i think it's simple enough to not need a danger/peril rule

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment