dojo / core

:rocket: Dojo 2 - language helpers and utilities.
http://dojo.io
Other
213 stars 58 forks source link

Create scripts for release process #36

Closed bryanforbes closed 8 years ago

bryanforbes commented 9 years ago

We need to figure out what the release process will look like. At this point, it looks like running grunt dist, running npm publish in that directory, and pushing the dist directory to the correct tag in a repository somewhere on Github (for bower). This means that we may need separate repos for the code we publish to bower (mayhem already does). Another alternative might be to create a branch for each bower release, set the version tag to that branch, and have a "src" tag for the source. This whole process needs to be investigated.

kitsonk commented 9 years ago

Should the issue be on dojo/dojo2-package-template? On Fri, 12 Jun 2015 at 17:27, Bryan Forbes notifications@github.com wrote:

We need to figure out what the release process will look like. At this point, it looks like running grunt dist, running npm publish in that directory, and pushing the dist directory to the correct tag in a repository somewhere on Github (for bower). This means that we may need separate repos for the code we publish to bower (mayhem already does). Another alternative might be to create a branch for each bower release, set the version tag to that branch, and have a "src" tag for the source. This whole process needs to be investigated.

— Reply to this email directly or view it on GitHub https://github.com/dojo/core/issues/36.

bryanforbes commented 9 years ago

Possibly, but @kfranqueiro and I decided to put the issue here for the most visibility and because core will most likely be the first package published.

edhager commented 9 years ago

I am going to take a look at the release script in dojo/dojo2 (https://github.com/dojo/dojo2/blob/master/support/release.sh) to see if I can use it in the loader repo.

kfranqueiro commented 9 years ago

FWIW Mayhem may have more up-to-date logic where bower is concerned, since it was publishing releases to a separate mayhem-bower repo.

edhager commented 9 years ago

The loader repo now has a script that can be used for all Dojo 2 repos: https://github.com/dojo/loader/blob/master/support/release.sh

The bower related steps are commented out.

edhager commented 9 years ago

A couple improvements I made over the Mayhem script...

  1. The script determines the git repo URL on its own.
  2. The script reads the name of the package from package.json.
nicknisi commented 9 years ago

It might be better to have this written in Node or something more cross-platform friendly.

edhager commented 9 years ago

The script needs to do some validation on the version number that is passed in (when it is passed in) and the version number read from package.json. In my testing, npm will not take any version number. In one test, I meant to use "2.0.0-alpha.3" and instead I typed "2.0.0.alpha.3" (a dot instead of a dash in front of "alpha"). The one I typed caused npm to throw an error saying the version number was invalid. Having the npm step fail is bad because the updates have already been pushed to GitHub so we need to make sure npm is going to be happy before we push to GitHub.

kfranqueiro commented 9 years ago

I'd suggest making use of the semver package to validate version numbers, that's the logic npm and bower use.

gaurav21r commented 9 years ago

@nicknisi Isn't the release script a Gruntfile ?

nicknisi commented 9 years ago

@gaurav21r The one referenced above in the loader repo is a shell script, which wouldn't work well on Windows.

mwistrand commented 9 years ago

I have been testing grunt-release, and so far it looks promising for what we need to do. I'm still looking into how we might configure this to also publish to a separate bower repo, but something like grunt-shell might be useful.

kitsonk commented 8 years ago

This has largely been rolled into that grunt-dojo2 package re-alignment work.