summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBryan McLellan <btm@loftninjas.org>2019-05-17 14:58:10 -0400
committerGitHub <noreply@github.com>2019-05-17 14:58:10 -0400
commit77a8474fcf502a613ca1eccd2b6488c7a28cecfa (patch)
tree8399d593bea16cbab613ec982450a15b8c02f8a9
parentd9e3ba467bc4669444a451abd3cb4e4a2052df3a (diff)
parent4265595d29295b9daf69d46ebfb5b28c6afe95d5 (diff)
downloadchef-77a8474fcf502a613ca1eccd2b6488c7a28cecfa.tar.gz
Merge pull request #8565 from chef/jsinha/add_local_updateversion
Add chef-14 update_version script
-rw-r--r--.expeditor/config.yml2
-rw-r--r--.expeditor/update_version.sh21
2 files changed, 22 insertions, 1 deletions
diff --git a/.expeditor/config.yml b/.expeditor/config.yml
index f9a30566cd..3fadf6bfaa 100644
--- a/.expeditor/config.yml
+++ b/.expeditor/config.yml
@@ -56,7 +56,7 @@ merge_actions:
ignore_labels:
- "Expeditor: Skip Version Bump"
- "Expeditor: Skip All"
- - bash:.expeditor/update_version.sh@chef/chef@master:
+ - bash:.expeditor/update_version.sh:
only_if: built_in:bump_version
- built_in:update_changelog:
ignore_labels:
diff --git a/.expeditor/update_version.sh b/.expeditor/update_version.sh
new file mode 100644
index 0000000000..e9d3268b5a
--- /dev/null
+++ b/.expeditor/update_version.sh
@@ -0,0 +1,21 @@
+#!/bin/sh
+
+############################################################################
+# What is this script?
+#
+# Chef uses a workflow tool called Expeditor to manage version bumps, changelogs
+# and releases. After a PR is merged in Chef Expeditor calls this script to update
+# the PATCH version in the VERSION file as well as the version.rb file in both chef
+# and chef-config. When that's done it bundle updates to pull in that new chef-config.
+############################################################################
+
+set -evx
+
+sed -i -r "s/^(\s*)VERSION = \".+\"/\1VERSION = \"$(cat VERSION)\"/" chef-config/lib/chef-config/version.rb
+sed -i -r "s/VersionString\.new\(\".+\"\)/VersionString.new(\"$(cat VERSION)\")/" lib/chef/version.rb
+
+# Update the version inside Gemfile.lock
+bundle update chef chef-config --jobs=7 --conservative
+
+# Once Expeditor finishes executing this script, it will commit the changes and push
+# the commit as a new tag corresponding to the value in the VERSION file. \ No newline at end of file