Skip to content
This repository has been archived by the owner on Feb 12, 2022. It is now read-only.

Add all release tasks to prompt menu #1328

Merged

Conversation

interactivellama
Copy link
Contributor

  • Git commands run from a menu
  • Add grunt-shell dependency
  • Ignores YAML file with upload credentials

TravisCI will fail, of course, because of the lack of grunt-shell module.

Originally, I had tried multiple prompts, but the idea of branching decision trees doesn't seem to work very well with the grunt structure, so instead you run grunt release 4 or 5 times--which is as close to "Edsel-like" as I think we can get.

Decision tree branching is still not supported, but multiple prompts are now implemented with defaults that expect a release to be built from master and pushed to major release branch (3.x).

Fixes #1070.

@@ -421,6 +444,144 @@ module.exports = function (grunt) {
}
}
},
shell: {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

move shell options into separate module. Gruntfile.js is becoming excessively large.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree. I was thinking about using https://github.com/creynders/load-grunt-configs

Try debugging the lint.

@swilliamset
Copy link
Contributor

? What branch would like to pull from upstream and build your release in (probably 3.x)? 3.7.x

Can we list the available branches to release from?

@swilliamset
Copy link
Contributor

please make the remote repo configurable defaulting to upstream and listing the known remotes for the user to choose.

@swilliamset
Copy link
Contributor

@cmcculloh please take a look at this branch. your insight would be helpful.

@interactivellama interactivellama force-pushed the release-all-the-things branch 2 times, most recently from fe39f41 to e3c2124 Compare June 8, 2015 21:21
@interactivellama
Copy link
Contributor Author

Updated with remote repo being configurable.

As to listing remotes are you thinking of running a shell command and some kind of CLI text pipe that is then parsed by JS function within the prompt? The other option would be github API, but I'm not sure that's worth the effort considering you are 90% of the time going to pulling down master to build from

},
{
config: 'release.remoteRepository',
default : 'upstream',

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why are we repeating the defaults we set on line 44 here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Grunt-prompt defaults work if the user leaves the prompt blank. Even if there is a values set at the top in the release object, then an empty answer will override that and set it to empty string/undefined. The values in release could probably be removed.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What I'm saying is, why not use grunt.config.release.remoteRepository here instead of the string "upstream"?

So:
default: grunt.config.release.remoteRepository,

@swilliamset
Copy link
Contributor

@interactivellama let me know when you've had a chance to push an update

@interactivellama
Copy link
Contributor Author

Updated with lo-dash compatible template strings. @cmcculloh @swilliamset

@interactivellama interactivellama modified the milestones: 3.8.0, 3.9.0 Jun 12, 2015
@interactivellama
Copy link
Contributor Author

Squashed and updated with master/3.8

@interactivellama
Copy link
Contributor Author

It only crashes the release task (and the saucelabs tests if those run and the process.env isn't present). I've added warnings to the top of the release task to warn releasers before the first prompt if those two files are not present.

default : '<%= release.remoteBaseBranch %>',
message: function() {
return 'What remote branch from ' + grunt.config('release.remoteRepository') +
' would like to build your release based upon?';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should be ' would you like to build your release based on' ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm old fashioned, I guess. 'On' is probably easier to understand in a publicly accessible repository for non-native English speakers.

@swilliamset
Copy link
Contributor

prompts

  1. repo
  2. branch
  3. version

refactor prompts to build temp branch from selected branch before prompting for next release number
upstream/master is currently x.x.x what would you like the next release to be?

this will ensure the version prompt has the most accurate data

also git fetch upstream --tag should be ran as well so tags are up to date

@interactivellama interactivellama force-pushed the release-all-the-things branch from d8da441 to bc2b550 Compare July 6, 2015 20:03
@interactivellama
Copy link
Contributor Author

Updated to do track remote branch first. Then look at package.jsonand build the build prompt which should make it not matter what branch you start in as long as the gruntFile is up to date.

@swilliamset
Copy link
Contributor

Sorry for the confusion. Can we include the version and the timestamp in the temp release branch?

Also some coloring on the yml file warning would be good.

Otherwise this whole thing is a huge step forward and i'm accepting.

swilliamset pushed a commit that referenced this pull request Jul 7, 2015
@swilliamset swilliamset merged commit d0fcbef into ExactTarget:master Jul 7, 2015
@interactivellama interactivellama deleted the release-all-the-things branch April 4, 2016 15:40
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Release automation stuff
4 participants