@@ -37,8 +37,10 @@ task :create_release, %i[gem_version dry_run] do |_t, args|
3737 puts 'Updating ujs:update'
3838 Rake ::Task [ 'ujs:update' ] . invoke
3939
40- release_the_new_npm_version ( npm_version , is_dry_run )
41- release_the_new_gem_version ( gem_version , is_dry_run )
40+ Release . commit_the_changes unless is_dry_run
41+
42+ Release . release_the_new_npm_version ( npm_version , is_dry_run )
43+ Release . release_the_new_gem_version ( gem_version , is_dry_run )
4244
4345 Release . push
4446end
@@ -56,6 +58,10 @@ module Release
5658 shell_commands . flatten . each { |shell_command | sh %(cd #{ dir } && #{ shell_command . strip } ) }
5759 end
5860
61+ def commit_the_changes
62+ sh_in_dir ( gem_root , 'git commit -am "Update pre-bundled react and React ujs"' )
63+ end
64+
5965 def ensure_there_is_nothing_to_commit
6066 status = `git status --porcelain`
6167
@@ -84,6 +90,10 @@ module Release
8490 puts 'Pulling latest commits from remote repository'
8591
8692 sh_in_dir ( gem_root , 'git pull --rebase' )
93+ sh_in_dir ( gem_root , 'bundle' )
94+ sh_in_dir ( gem_root , 'yarn' )
95+ sh_in_dir ( File . join ( gem_root , 'react-builds' ) , 'yarn' )
96+
8797 raise 'Failed in pulling latest changes from default remore repository.' unless $CHILD_STATUS. success?
8898 rescue Errno ::ENOENT
8999 raise 'Ensure you have Git and Bundler installed before continuing.'
@@ -114,8 +124,7 @@ module Release
114124 puts 'ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ'
115125 puts 'Use the OTP for NPM!'
116126 puts 'ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ'
117-
118- system ( release_it_command )
127+ sh_in_dir ( release_it_command )
119128 end
120129
121130 def push
0 commit comments