Closed bryanforbes closed 8 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.
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.
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.
FWIW Mayhem may have more up-to-date logic where bower is concerned, since it was publishing releases to a separate mayhem-bower repo.
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.
A couple improvements I made over the Mayhem script...
It might be better to have this written in Node or something more cross-platform friendly.
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.
I'd suggest making use of the semver
package to validate version numbers, that's the logic npm and bower use.
@nicknisi Isn't the release script a Gruntfile ?
@gaurav21r The one referenced above in the loader repo is a shell script, which wouldn't work well on Windows.
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.
This has largely been rolled into that grunt-dojo2 package re-alignment work.
We need to figure out what the release process will look like. At this point, it looks like running
grunt dist
, runningnpm publish
in that directory, and pushing thedist
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.