Skip to content
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 ourterms of serviceand privacy statement.We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ability to add other artifacts to the release commit #96

Closed
JaKXzopened this issue Aug 24, 2016 · 11 comments
Closed

Ability to add other artifacts to the release commit #96

JaKXzopened this issue Aug 24, 2016 · 11 comments

Comments

@JaKXz
Copy link
Contributor

JaKXz commented Aug 24, 2016

ATM, I'm amending because I want the produced artifacts to be part of thechore(release): x.x.xcommit.

"prerelease":"webpack -p --bail",//produces some bundle artifacts that I want to commit
"release":"standard-version -s",
"postrelease":"git commit -a --amend --no-edit"

However,because of the way git worksthis creates a new commit object since the original commit is taggedbeforethe amend happens. What would be nice is if mypostreleasescript was really apoststandard-versionscript (i.e. a "lifecycle-style" hook like the npm run script itself).

cc@stevemao@bcoe

@gkatsev
Copy link

gkatsev commented Aug 26, 2016

Been looking at using standard-version for videojs. We basically do this for pre-build bundles for bower users or other users who don't want to use a bundler.
A potentially easy change is to be able to run the tagging portion of standard-version separately. So, you run the changelog generator, it doesn't commit or tag yet, then, you run your build script and then run the commit/tagging portion.
Or you could accept a command to run before committing. Kind of like you can do annpm versionscript that builds a release and adds the changes to git.

@JaKXz
Copy link
Contributor Author

JaKXz commented Oct 7, 2016

@bcoe@stevemaothanks for v3.0!:) do you guys have any thoughts on this though?

@bcoe
Copy link
Member

bcoe commented Oct 7, 2016

@JaKXzI'm not opposed to this idea, would love to make sure we support a few common workflows; is there an approach that you think would work well for both your and@gkatsev's use-case?

@Tapppi
Copy link
Member

Tapppi commented Oct 7, 2016

@bcoe@gkatsev@JaKXzIs there still a need for a hook betweengit addandgit commit/tag?Doesv3.0and--commit-allnot enable this, since artifacts built before the release script will be added to the commit?

"prerelease": "webpack -p --bail",
"release": "standard-version --commit-all" // Could replace --commit-all with -a

I'm not against supporting a "lifecycle-hook" between the add and commit/tag (e.g.standard-version-pre-commitor something less verbose) but at least this use-case seems to be covered.

@gkatsev
Copy link

gkatsev commented Oct 7, 2016

I think that--commit-allcould potentially work for my usecase. It seems similar to what I've done with the built-in version script:

"version": "npm run build && git add -f dist/"

Then when npm's versioning runs, it just commits the entire thing.

@Tapppi
Copy link
Member

Tapppi commented Oct 7, 2016

Great! I think this issue can technically be closed, since you can commit any artifacts built beforestandard-versionwith--commit-all.Just gonna wait for@JaKXzto confirm that this works for him as well.

@Tapppi
Copy link
Member

Tapppi commented Oct 7, 2016

Actually we should keep this issue open to track documentation relating to this use-case.

@JaKXz
Copy link
Contributor Author

JaKXz commented Oct 7, 2016

@Tapppi--commit-allworks! Thanks so much:D

@JaKXz
Copy link
Contributor Author

JaKXz commented Oct 7, 2016

...actually, I may have spoken too soon. I had to add the built assets to the release commit myself.

@JaKXz
Copy link
Contributor Author

JaKXz commented Oct 7, 2016

Based on#121it looks like I have togit add.beforestandard-version -as.

Yes - documentation on this would be great:I can try to write something up tonight but can't promise free time so if someone else can do it please do#127.

@Tapppi
Copy link
Member

Tapppi commented Oct 8, 2016

Yes, currently the commit-all flag just commitsalready staged changes.That might seem confusing, but I actually think it allows for greater control over the process. Needs to be clear in the documentation though. I'll take a look at the pr soon when I'm on my comp.

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

No branches or pull requests

4 participants