tasks/version.rb in chef-dk-1.2.22 vs tasks/version.rb in chef-dk-1.3.40

- old
+ new

@@ -13,13 +13,36 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # +task :ci_version_bump do + begin + require "rake" + + Rake::Task["version:bump_patch"].invoke + Rake::Task["version:update_gemfile_lock"].invoke + + begin + Rake::Task["changelog:update"].invoke + rescue Exception => e + puts "There was an error updating the CHANGELOG" + puts e + end + + begin + Rake::Task["update_dockerfile"].invoke + rescue Exception => e + puts "There was an error updating the Dockerfile" + puts e + end + end +end + namespace :version do desc "Bump patch version in lib/chef-dk/version.rb and update Gemfile*.lock conservatively to include the new version. If Gemfile has changed, this will update modified constraints as well." - task :bump => %w{version:bump_patch version:update_gemfile_lock} + task :bump => "ci_version_bump" desc "Show the current version." task :show do puts version end @@ -66,10 +89,11 @@ "#{$1}#{new_version}" end puts "Updating version in #{version_rb_path} from #{version} to #{new_version.chomp}" IO.write(version_rb_path, new_version_file) IO.write(release_notes_path, "# ChefDK #{$2}.#{$3.to_i + 1} Release Notes") + Rake::Task["changelog::archive"].invoke Rake::Task["version:update_gemfile_lock"].invoke Rake::Task["bundle:install"].invoke end desc "Bump the major version in lib/chef-dk/version.rb" @@ -81,9 +105,10 @@ "#{$1}#{new_version}" end puts "Updating version in #{version_rb_path} from #{version} to #{new_version.chomp}" IO.write(version_rb_path, new_version_file) IO.write(release_notes_path, "# ChefDK #{$2.to_i + 1}.0 Release Notes") + Rake::Task["changelog::archive"].invoke Rake::Task["version:update_gemfile_lock"].invoke Rake::Task["bundle:install"].invoke end desc "Update the Gemfile.lock to include the current chef-dk version"