shakacode / react_on_rails

Integration of React + Webpack + Rails + rails/webpacker including server-side rendering of React, enabling a better developer experience and faster client performance.
https://www.shakacode.com/react-on-rails/docs/
MIT License
5.09k stars 627 forks source link

Issues with release script #235

Closed justin808 closed 8 years ago

justin808 commented 8 years ago

@robwise

  1. if the tag exists, we need to delete it FIRST. When you did a test, you did PUSH the tag to the repo!
  2. we should tag from both the gem release and release-it, as they have different tag formats. I'm OK having every release with both tags.

Alternately, we can dry up the tags and decide on either:

Full output below.


➜  ~/shakacode/react_on_rails (master u=) rake -D release                                                                                                                                                                                                                                                                                                                                                                      [20:37:18]
rake release[gem_version,dry_run,tools_install]
    Releases both the gem and node package using the given version.

    IMPORTANT: the gem version must be in valid rubygem format (no dashes).
    It will be automatically converted to a valid npm semver by the rake task
    for the node package version. This only makes a difference for pre-release
    versions such as `3.0.0.beta.1` (npm version would be `3.0.0-beta.1`).

    This task will also globally install gem-release (ruby gem) and
    release-it (node package) unless you specify skip installing tools.

    1st argument: The new version in rubygem format (no dashes). Pass no argument to
                  automatically perform a patch version bump.
    2nd argument: Perform a dry run by passing 'true' as a second argument.
    3rd argument: Skip installing tools by passing 'false' as a third argument (default is true).

    Example: `rake release[2.1.0,false,false]`

➜  ~/shakacode/react_on_rails (master u=) rake release[2.1.0]                                                                                                                                                                                                                                                                                                                                                                  [20:37:30]
rm -rf /Users/justin/shakacode/react_on_rails/gen-examples/examples
cd /Users/justin/shakacode/react_on_rails && gem install gem-release
Successfully installed gem-release-0.7.4
1 gem installed
cd /Users/justin/shakacode/react_on_rails && gem bump --no-commit --version 2.1.0
Bumping react_on_rails from 2.0.2 to version 2.1.0
All is good, thanks my friend.
cd /Users/justin/shakacode/react_on_rails/spec/dummy && bundle install
Resolving dependencies...
Using i18n 0.7.0
Using json 1.8.3
Using minitest 5.8.4
Using thread_safe 0.3.5
Using builder 3.2.2
Using erubis 2.7.0
Using mini_portile2 2.0.0
Using rack 1.6.4
Using mime-types 2.99
Using arel 6.0.3
Using addressable 2.4.0
Using io-like 0.3.0
Using ast 2.2.0
Using execjs 2.6.0
Using awesome_print 1.6.1
Using debug_inspector 0.0.2
Using sass 3.4.21
Using bundler 1.11.2
Using byebug 8.2.1
Using ffi 1.9.10
Using cliver 0.3.2
Using coderay 1.1.0
Using coffee-script-source 1.10.0
Using thor 0.19.1
Using rake 10.5.0
Using concurrent-ruby 1.0.0
Using connection_pool 2.2.0
Using unf_ext 0.0.7.1
Using netrc 0.11.0
Using docile 1.1.5
Using simplecov-html 0.10.0
Using tins 1.6.0
Using diff-lcs 1.2.5
Using interception 0.5
Using multi_json 1.11.2
Using libv8 3.16.14.13
Using method_source 0.8.2
Using websocket-extensions 0.1.2
Using powerpack 0.1.1
Using slop 3.6.0
Using yard 0.8.7.6
Using rainbow 2.1.0
Using ref 2.0.0
Using rspec-support 3.4.1
Using ruby-progressbar 1.7.5
Using rubyzip 1.1.7
Using tilt 2.0.2
Using websocket 1.2.2
Using spring 1.6.2
Using sqlite3 1.3.11
Using rdoc 4.2.1
Using tzinfo 1.2.2
Using nokogiri 1.6.7.2
Using rack-test 0.6.3
Using mail 2.6.3
Using launchy 2.4.3
Using archive-zip 0.7.0
Using parser 2.3.0.2
Using autoprefixer-rails 6.3.1
Using uglifier 2.7.2
Using binding_of_caller 0.7.2
Using childprocess 0.5.9
Using coffee-script 2.4.1
Using scss_lint 0.44.0
Using sprockets 3.5.2
Using unf 0.1.4
Using simplecov 0.11.1
Using term-ansicolor 1.3.2
Using websocket-driver 0.6.3
Using pry 0.10.3
Using therubyracer 0.12.2
Using rspec-core 3.4.1
Using rspec-expectations 3.4.0
Using rspec-mocks 3.4.1
Using sdoc 0.4.1
Using activesupport 4.2.3
Using loofah 2.0.3
Using xpath 2.0.0
Using chromedriver-helper 1.0.0
Using rubocop 0.36.0
Using ruby-lint 2.1.0
Using bootstrap-sass 3.3.6
Using selenium-webdriver 2.49.0
Using domain_name 0.5.25
Using pry-byebug 3.3.0
Using pry-doc 0.8.0
Using pry-rails 0.3.4
Using pry-rescue 1.4.2
Using pry-stack_explorer 0.4.9.2
Using rails-deprecated_sanitizer 1.0.3
Using globalid 0.3.6
Using activemodel 4.2.3
Using jbuilder 2.4.0
Using rails-html-sanitizer 1.0.2
Using capybara 2.6.0
Using http-cookie 1.0.2
Using rails-dom-testing 1.0.7
Using activejob 4.2.3
Using activerecord 4.2.3
Using capybara-screenshot 1.0.11
Using capybara-webkit 1.8.0
Using poltergeist 1.8.1
Using rest-client 1.8.0
Using actionview 4.2.3
Using coveralls 0.8.10
Using actionpack 4.2.3
Using actionmailer 4.2.3
Using railties 4.2.3
Using sprockets-rails 3.0.0
Using coffee-rails 4.1.1
Using generator_spec 0.9.3
Using jquery-rails 4.1.0
Using rspec-rails 3.4.0
Using rails 4.2.3
Using sass-rails 5.0.4
Using web-console 2.2.1
Using turbolinks 2.5.3
Using react_on_rails 2.1.0 (was 2.0.2) from source at `../..`
Bundle complete! 34 Gemfile dependencies, 118 gems now installed.
Use `bundle show [gemname]` to see where a bundled gem is installed.
cd /Users/justin/shakacode/react_on_rails && git add .
npm install release-it -g
/Users/justin/.nvm/versions/node/v5.0.0/bin/release-it -> /Users/justin/.nvm/versions/node/v5.0.0/lib/node_modules/release-it/bin/release.js
- assert-plus@0.2.0 node_modules/release-it/node_modules/sshpk/node_modules/assert-plus
/Users/justin/.nvm/versions/node/v5.0.0/lib
└─┬ release-it@2.3.1
  ├─┬ inquirer@0.9.0
  │ └── cli-width@1.1.1
  ├─┬ insight@0.6.0
  │ └─┬ request@2.67.0
  │   ├── bl@1.0.1
  │   ├─┬ form-data@1.0.0-rc3
  │   │ └── async@1.5.2
  │   ├─┬ har-validator@2.0.6
  │   │ └── is-my-json-valid@2.12.4
  │   ├── hawk@3.1.3
  │   ├─┬ http-signature@1.1.1
  │   │ ├── assert-plus@0.2.0
  │   │ └─┬ sshpk@1.7.3
  │   │   ├── dashdash@1.12.2
  │   │   └── tweetnacl@0.13.3
  │   └─┬ mime-types@2.1.9
  │     └── mime-db@1.21.0
  ├─┬ repo-path-parse@1.0.1
  │ └─┬ doxme@1.8.2
  │   └── striptags@2.1.1
  └── when@3.7.7

cd /Users/justin/shakacode/react_on_rails && release-it --non-interactive --npm.publish 2.1.0
[execute] git config --get remote.origin.url
git@github.com:shakacode/react_on_rails.git
Release source repo
[execute] git rev-parse --git-dir
.git
[execute] bump package.json 2.1.0
No build command was provided.
[execute] git add package.json
[execute] git diff-index --name-only HEAD --exit-code
lib/react_on_rails/version.rb
package.json
spec/dummy/Gemfile.lock
[execute] git commit  --message="Release 2.1.0" .
[master f0d332c] Release 2.1.0
 3 files changed, 3 insertions(+), 3 deletions(-)
[execute] git tag  --annotate --message="Release 2.1.0" 2.1.0
[execute] git push
To git@github.com:shakacode/react_on_rails.git
   0a9a364..f0d332c  master -> master
[execute] git push --tags
To git@github.com:shakacode/react_on_rails.git
 ! [rejected]        2.1.0 -> 2.1.0 (already exists)
error: failed to push some refs to 'git@github.com:shakacode/react_on_rails.git'
hint: Updates were rejected because the tag already exists in the remote.
ERROR Could not push tag(s). Does tag "2.1.0" already exist? Use --force to move a tag.
[execute] npm publish . --tag latest

> react-on-rails@2.1.0 prepublish /Users/justin/shakacode/react_on_rails
> npm run build

> react-on-rails@2.1.0 build /Users/justin/shakacode/react_on_rails
> node_package/scripts/build

node_package/src/ComponentStore.js -> node_package/lib/ComponentStore.js
node_package/src/ReactOnRails.js -> node_package/lib/ReactOnRails.js
node_package/src/RenderUtils.js -> node_package/lib/RenderUtils.js
node_package/src/buildConsoleReplay.js -> node_package/lib/buildConsoleReplay.js
node_package/src/clientStartup.js -> node_package/lib/clientStartup.js
node_package/src/context.js -> node_package/lib/context.js
node_package/src/createReactElement.js -> node_package/lib/createReactElement.js
node_package/src/generatorFunction.js -> node_package/lib/generatorFunction.js
node_package/src/handleError.js -> node_package/lib/handleError.js
node_package/src/isRouterResult.js -> node_package/lib/isRouterResult.js
node_package/src/serverRenderReactComponent.js -> node_package/lib/serverRenderReactComponent.js
+ react-on-rails@2.1.0
No distRepo provided, done.
cd /Users/justin/shakacode/react_on_rails && gem release
WARNING:  open-ended dependency on connection_pool (>= 0) is not recommended
  if connection_pool is semantically versioned, use:
    add_runtime_dependency 'connection_pool', '~> 0'
WARNING:  open-ended dependency on rails (>= 3.2) is not recommended
  if rails is semantically versioned, use:
    add_runtime_dependency 'rails', '~> 3.2'
WARNING:  open-ended dependency on rspec (>= 0, development) is not recommended
  if rspec is semantically versioned, use:
    add_development_dependency 'rspec', '~> 0'
WARNING:  open-ended dependency on coveralls (>= 0, development) is not recommended
  if coveralls is semantically versioned, use:
    add_development_dependency 'coveralls', '~> 0'
WARNING:  open-ended dependency on generator_spec (>= 0, development) is not recommended
  if generator_spec is semantically versioned, use:
    add_development_dependency 'generator_spec', '~> 0'
WARNING:  open-ended dependency on pry (>= 0, development) is not recommended
  if pry is semantically versioned, use:
    add_development_dependency 'pry', '~> 0'
WARNING:  open-ended dependency on pry-byebug (>= 0, development) is not recommended
  if pry-byebug is semantically versioned, use:
    add_development_dependency 'pry-byebug', '~> 0'
WARNING:  open-ended dependency on pry-stack_explorer (>= 0, development) is not recommended
  if pry-stack_explorer is semantically versioned, use:
    add_development_dependency 'pry-stack_explorer', '~> 0'
WARNING:  open-ended dependency on pry-doc (>= 0, development) is not recommended
  if pry-doc is semantically versioned, use:
    add_development_dependency 'pry-doc', '~> 0'
WARNING:  open-ended dependency on pry-state (>= 0, development) is not recommended
  if pry-state is semantically versioned, use:
    add_development_dependency 'pry-state', '~> 0'
WARNING:  open-ended dependency on pry-toys (>= 0, development) is not recommended
  if pry-toys is semantically versioned, use:
    add_development_dependency 'pry-toys', '~> 0'
WARNING:  open-ended dependency on pry-rescue (>= 0, development) is not recommended
  if pry-rescue is semantically versioned, use:
    add_development_dependency 'pry-rescue', '~> 0'
WARNING:  open-ended dependency on binding_of_caller (>= 0, development) is not recommended
  if binding_of_caller is semantically versioned, use:
    add_development_dependency 'binding_of_caller', '~> 0'
WARNING:  open-ended dependency on awesome_print (>= 0, development) is not recommended
  if awesome_print is semantically versioned, use:
    add_development_dependency 'awesome_print', '~> 0'
WARNING:  See http://guides.rubygems.org/specification-reference/ for help
  Successfully built RubyGem
  Name: react_on_rails
  Version: 2.1.0
  File: react_on_rails-2.1.0.gem
Pushing gem to https://rubygems.org...
Successfully registered gem: react_on_rails (2.1.0)
Deleting left over gem file react_on_rails-2.1.0.gem
All is good, thanks my friend.
robwise commented 8 years ago

@justin808 that's a one-time problem, though, right? We should be good from now on? And I think two tags for the same thing is silly, just stick with the one tag. It's clearer and simpler. KISS!

justin808 commented 8 years ago

Tags -- probably -- was caused by us doing a test...

In terms of tags using v or not, one way is the rubygem way and one way is the npm way. Please confirm which way we should go and update the Changelog and delete the unused tags.

CC: @alexfedoseev @samnang

robwise commented 8 years ago

@justin808 So I'm looking at the release-it api and I'm not sure that I can even turn the tagging thing off like we can with the gem-release library. So that would kind of force our hand into using the npm style.

release-it: https://www.npmjs.com/package/release-it gem-release: https://github.com/svenfuchs/gem-release

justin808 commented 8 years ago

We'll put this one on ice for now. Not critical.

samnang commented 8 years ago

@justin808 @robwise @alexfedoseev I thought bundler already provide rake task helpers in gem development process http://bundler.io/v1.11/bundle_gem.html. I vote for tagging with v prefix because this project is more about ruby side than js side.