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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add information on how to release a new my-first-hoodie version #79

Open
gr2m opened this issue Jul 5, 2015 · 13 comments
Open

add information on how to release a new my-first-hoodie version #79

gr2m opened this issue Jul 5, 2015 · 13 comments

Comments

@gr2m
Copy link
Contributor

gr2m commented Jul 5, 2015

I've pushed a new commit: 12b24a5. It fixes an issue in hoodie.js, fixed in [email protected].

I don't know how to currently release a new my-first-hoodie version, so it becomes what I get when I do hoodie new myapp. Can we put that information somewhere accessible?

@janl
Copy link
Contributor

janl commented Jul 5, 2015

We deploy m-f-h manually, like animals:

  • run all tests
  • update version number in package.json
  • commit package.json
  • git tag vX.Y.Z
  • npm publish
  • git push --tags

@gr2m
Copy link
Contributor Author

gr2m commented Jul 5, 2015

isn't the some bundling / shrinkwrap step before publishing? I still don't know how this works exactly, just want to be sure I don't mess up a release :)

@janl
Copy link
Contributor

janl commented Jul 5, 2015

@gr2m yes, that happens before everything I wrote, like any commits you are making. cc @boennemann for the correct incantations

@boennemann
Copy link
Contributor

The situation here is a bit difficult, I'm hesitant to add anything to the README.md because that's what end users end up with in their newly created app folder. They certainly shouldn't be bothered with instructions for our release process.

So I'm writing this down here and we can then discuss where to put it. There are two parts two it.

When one installs or updates a dependency like
npm install --save [email protected] they must run npm shrinkwrap immediately afterwards. That is to make sure that the npm-shrinkwrap.json file is updated. Without this the updated dependency won't be installed/bundled. (With npm@3 that happens automatically)

Manually releasing works like this (assuming clear stage):

  1. npm version <major|minor|patch> -m "chore(package): release %s" This updates the version number in both the package.json and npm-shrinkwrap.json, creates a commit with these changes and the passed message and creates a tag.
  2. git push origin master --tags
  3. npm publish

A note on tests: This repository doesn't have any tests and isn't built on Travis so there is no need for that right now. If you have a manual release process and you'd want to make that tests run you'd define "preversion": "npm run test" in your package.jsons script section. Additionally one should wait for a passed Travis build after 2. before continuing to do 3.

@janl @gr2m

`

@gr2m
Copy link
Contributor Author

gr2m commented Jul 5, 2015

npm version <major|minor|patch> -m "chore(package): release "

There is a %s placeholder for the version, so we can do npm version <major|minor|patch> -m "chore(package): release v%s"

@boennemann
Copy link
Contributor

@gr2m Yeah 👍 The repetition annoyed me as well :D I'll edit it in.

@varjmes
Copy link
Contributor

varjmes commented Jul 6, 2015

Would the dot files repo be a good place to put it? I know it's not a 100% fit but it could be good for now. If you end up needing more readies about stuff that don't come bundled with a theme/package/whatever, perhaps a wiki in the future?

@gr2m
Copy link
Contributor Author

gr2m commented Jul 6, 2015

or maybe the wiki of my-first-hoodie?

@boennemann
Copy link
Contributor

Here is my take on this, which might not be that open, but deals with the time constraint we're having till September:

This whole repo will undergo a split into the hoodie-app and hoodie-template thing. Once that's done hoodie-app can have a relevant README.md and automated release process again. I wouldn't want to spend too much time on figuring out a documentation process for this as is. For the time being people who do release can find what they need in this issue.

@gr2m
Copy link
Contributor Author

gr2m commented Jul 6, 2015

👌

@janl
Copy link
Contributor

janl commented Jul 8, 2015

npm version <major|minor|patch> -m "chore(package): release %s" This updates the version number in both the package.json and npm-shrinkwrap.json, creates a commit with these changes and the passed message and creates a tag.
git push origin master --tags
npm publish

I’d switch this around in the following way:

  • npm version
  • npm publish
  • git push origin master
  • git push origin master --tags

That way:

  1. if npm publish fails for any reason, the tag isn’t public yet, and you can re-do everything.
  2. git push without --tags pushes any outstanding commits that you might still have locally
  3. git push with --tags pushes the tag that npm publish created.

It’s the same process, but with a few more common-error-failsaves built in.

@boennemann
Copy link
Contributor

@jan What do you mean by "npm publish fails"? How can it fail, other than the registry being down?

@janl
Copy link
Contributor

janl commented Jul 8, 2015

@boennemann errors in package.json is what happened to me repeatedly. This will be reduced by the use of npm version, but I can still see scenarios where this could happen, because npm publish publishes the latest version on disk, not the latest commit in git.

boennemann added a commit that referenced this issue Oct 30, 2015
This can now also be published via semantic-release

Closes #79, Closes #78, Closes #77, Closes #61

BREAKING CHANGE: This version can no longer be used as an Hoodie template,
it's just the bare `www` folder.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants