DEV: Parse and install bundler version from Gemfile.lock (#530)
authorDavid Taylor <david@taylorhq.com>
Tue, 23 Mar 2021 14:40:49 +0000 (14:40 +0000)
committerGitHub <noreply@github.com>
Tue, 23 Mar 2021 14:40:49 +0000 (14:40 +0000)
This ensures that changes in Bundler's behavior are only introduced
when we deliberately bump the version in the Gemfile

templates/web.template.yml

index 28fb22d00877400050c0705671965780e72ba0b4..83b84b21dd41d2127c684c49035f9afd976e92c1 100644 (file)
@@ -144,8 +144,8 @@ run:
       cd: $home
       hook: web
       cmd:
-        # ensure we are on latest bundler
-        - gem update bundler
+        # install bundler version to match Gemfile.lock
+        - gem install bundler --conservative -v $(awk '/BUNDLED WITH/ { getline; gsub(/ /,""); print $0 }' Gemfile.lock)
         - find $home ! -user discourse -exec chown discourse {} \+
 
   - exec: