summaryrefslogtreecommitdiff
path: root/config/initializers
diff options
context:
space:
mode:
Diffstat (limited to 'config/initializers')
-rw-r--r--config/initializers/update_gs_version_number.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/config/initializers/update_gs_version_number.rb b/config/initializers/update_gs_version_number.rb
new file mode 100644
index 0000000..303b1e0
--- /dev/null
+++ b/config/initializers/update_gs_version_number.rb
@@ -0,0 +1,6 @@
+# The Gemeinschaft version is stored in an environment variable.
+# It equals the branch in git.
+#
+if !ENV['GS_VERSION'].nil? && GsParameter.get('GEMEINSCHAFT_VERSION') != ENV['GS_VERSION']
+ GsParameter.where(:name => 'GEMEINSCHAFT_VERSION').first.update_attributes(:name => ENV['GS_VERSION'])
+end \ No newline at end of file