FEATURE: Store the `version` parameter as custom value in git config
authorGerhard Schlager <gerhard.schlager@discourse.org>
Thu, 13 Apr 2023 10:41:02 +0000 (12:41 +0200)
committerGerhard Schlager <mail@gerhard-schlager.at>
Wed, 19 Apr 2023 13:53:10 +0000 (15:53 +0200)
This is particularly useful when the version is pointing to a git tag like `beta`, otherwise we won't be able to reliably detect the tracked version at runtime.

templates/web.template.yml

index 4c4f950591a669e25827c60ec8311b35626a63fe..10b006e137bce5637822d22f2840be509bd042f8 100644 (file)
@@ -107,6 +107,7 @@ run:
                 git -c advice.detachedHead=false checkout $version
             fi
           '
+        - sudo -H -E -u discourse git config user.discourse-version $version
         - mkdir -p tmp
         - chown discourse:www-data tmp
         - mkdir -p tmp/pids