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

gulp release #2841

Merged
merged 11 commits into from
Jul 17, 2018
Merged

gulp release #2841

merged 11 commits into from
Jul 17, 2018

Conversation

jpoon
Copy link
Member

@jpoon jpoon commented Jul 15, 2018

What this PR does / why we need it:

Migrates to gulp 4.0 and introduces gulp release command which will:

  1. bump the package version
  2. create the changelog. the categorization of the issues is picked up from the GH labels (kind/bug, kind/feature, etc); which is why you may have been seeing me label a bunch of issues recently.
  3. create the git commit with the above changes
  4. create a git tag

Example usage:

gulp release --semver patch --githubToken [TOKEN]

Once run, to push a release to remote: git push --follow-tags.

In the migration to gulp4.0, simplified some of the gulp tasks, we now have the following:

[12:09:42] Tasks for /Volumes/Source/Vim/gulpfile.js
[12:09:42] ├── tsc
[12:09:42] ├── tslint
[12:09:42] ├── prettier
[12:09:42] ├── forceprettier
[12:09:42] ├── test
[12:09:42] ├─┬ build
[12:09:42] │ └─┬ <series>
[12:09:42] │   ├── prettier
[12:09:42] │   └─┬ <parallel>
[12:09:42] │     ├── tsc
[12:09:42] │     └── tslint
[12:09:42] ├─┬ release
[12:09:42] │ └─┬ <series>
[12:09:42] │   ├── updateVersion
[12:09:42] │   ├── createChangelog
[12:09:42] │   ├── createGitCommit
[12:09:42] │   └── createGitTag
[12:09:42] └─┬ default
[12:09:42]   └─┬ <series>
[12:09:42]     ├─┬ build
[12:09:42]     │ └─┬ <series>
[12:09:42]     │   ├── prettier
[12:09:42]     │   └─┬ <parallel>
[12:09:42]     │     ├── tsc
[12:09:42]     │     └── tslint
[12:09:42]     └── test

Introduced a gulp build command which will run prettier, tsc, tslint. gulp (default) now runs both build and test.

Which issue(s) this PR fixes

Special notes for your reviewer:

@TravisBuddy
Copy link

Travis tests have failed

Hey @jpoon,
Please read the following log in order to understand the failure reason.
It'll be awesome if you fix what's wrong and commit the changes.

Node.js: 8

npm run build
> vim@0.15.0 build /home/travis/build/VSCodeVim/Vim
> gulp

[19:13:54] Using gulpfile ~/build/VSCodeVim/Vim/gulpfile.js
[19:13:54] Starting 'default'...
[19:13:54] Starting 'build'...
[19:13:54] Starting 'prettier'...
[19:13:54] Finished 'prettier' after 31 ms
[19:13:54] Starting 'tsc'...
[19:13:54] Starting 'tslint'...
[19:13:59] Finished 'tslint' after 5.32 s
[19:14:07] Finished 'tsc' after 13 s
[19:14:07] Finished 'build' after 13 s
[19:14:07] Starting 'test'...
Building container...
time="2018-07-15T19:14:07Z" level=error msg="failed to dial gRPC: cannot connect to the Docker daemon. Is 'docker daemon' running on this host?: dial unix /var/run/docker.sock: connect: no such file or directory" 
Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
[19:14:07] 'test' errored after 296 ms
[19:14:07] Error in plugin "test"
Message:
    Docker build failed.
[19:14:07] 'default' errored after 13 s
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! vim@0.15.0 build: `gulp`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the vim@0.15.0 build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/travis/.npm/_logs/2018-07-15T19_14_07_540Z-debug.log

@TravisBuddy
Copy link

Travis tests have failed

Hey @jpoon,
Please read the following log in order to understand the failure reason.
It'll be awesome if you fix what's wrong and commit the changes.

Node.js: 8

npm run build
> vim@0.15.0 build /home/travis/build/VSCodeVim/Vim
> gulp

[19:15:27] Using gulpfile ~/build/VSCodeVim/Vim/gulpfile.js
[19:15:27] Starting 'default'...
[19:15:27] Starting 'build'...
[19:15:27] Starting 'prettier'...
[19:15:27] Finished 'prettier' after 27 ms
[19:15:27] Starting 'tsc'...
[19:15:27] Starting 'tslint'...
[19:15:31] Finished 'tslint' after 4.26 s
[19:15:40] Finished 'tsc' after 13 s
[19:15:40] Finished 'build' after 13 s
[19:15:40] Starting 'test'...
Building container...
Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
[19:15:40] 'test' errored after 561 ms
[19:15:40] Error in plugin "test"
Message:
    Docker build failed.
[19:15:40] 'default' errored after 13 s
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! vim@0.15.0 build: `gulp`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the vim@0.15.0 build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/travis/.npm/_logs/2018-07-15T19_15_40_670Z-debug.log

@jpoon jpoon requested a review from xconverge July 15, 2018 20:18
@xconverge
Copy link
Member

Is there a way to add a custom part to the changelog with this workflow?

@jpoon
Copy link
Member Author

jpoon commented Jul 16, 2018

No, it's all automated and driven from the GitHub issues.

gulpfile.js Outdated

var options = minimist(process.argv.slice(2), releaseOptions);

if (!options.githubToken) {
Copy link
Member

Choose a reason for hiding this comment

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

any chance you can make this take an environment variable too if the argument is not defined? It is not a big deal but I had been using CHANGELOG_GITHUB_TOKEN

Copy link
Member Author

Choose a reason for hiding this comment

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

Done

@xconverge
Copy link
Member

Looks good to me, my only concern is the lack of an ability to add even a single sentence to a changelog. Breaking changes and big changes then cannot be mentioned clearly.

@jpoon
Copy link
Member Author

jpoon commented Jul 17, 2018

Breaking changes and big changes then cannot be mentioned clearly.

All driven through labels. So if you add a "backwards-incompatible" label, it'll put it in the "breaking changes" section. Similar with enhancements/features vs bugs.

@jpoon jpoon merged commit 9a290e5 into master Jul 17, 2018
@jpoon jpoon deleted the changelog branch July 17, 2018 21:19
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

Successfully merging this pull request may close these issues.

3 participants