summaryrefslogtreecommitdiff
path: root/config
diff options
context:
space:
mode:
authorStefan Wintermeyer <stefan.wintermeyer@amooma.de>2013-01-18 17:27:15 +0100
committerStefan Wintermeyer <stefan.wintermeyer@amooma.de>2013-01-18 17:27:15 +0100
commit12e91c4932e32808e5a9bf3f454920e7fb1b7d61 (patch)
treed0ee589d4e930f85cac72deb567f1dd29008a9b3 /config
parent66f1f2204619377eb34d657d582bd098813e5a7c (diff)
Imports the GS version number from ENV['GS_VERSION']. #98
Diffstat (limited to 'config')
-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