[ARVADOS] created: 44042f1b80c65e09aa94c738c0ac385b365b0669
git at public.curoverse.com
git at public.curoverse.com
Wed Sep 23 11:54:57 EDT 2015
at 44042f1b80c65e09aa94c738c0ac385b365b0669 (commit)
commit 44042f1b80c65e09aa94c738c0ac385b365b0669
Author: Brett Smith <brett at curoverse.com>
Date: Wed Sep 23 11:38:06 2015 -0400
6967: Extend application.default.yml source_version detection.
* Try to get information from Git first, since that will be most
comprehensive.
* If that fails—whether because Git isn't installed, or because Git
can't find any information—try to read the git-commit.version file
provided by our packages.
diff --git a/apps/workbench/config/application.default.yml b/apps/workbench/config/application.default.yml
index c458a50..c08dfbb 100644
--- a/apps/workbench/config/application.default.yml
+++ b/apps/workbench/config/application.default.yml
@@ -1,6 +1,30 @@
# Do not use this file for site configuration. Create application.yml
# instead (see application.yml.example).
+<%
+source_version = ""
+local_modified = false
+begin
+ status_output = false
+ IO.popen(["git", "status", "-s"], "r", err: [:child, :out]) do |git_pipe|
+ git_pipe.each_line do |_|
+ status_output = true
+ end
+ end
+ if $?.success?
+ source_version = `git log -n1 --format=%H`.strip
+ local_modified = status_output
+ else
+ raise SystemCallError.new("git exited #{$?.exitstatus}")
+ end
+rescue SystemCallError
+ begin
+ source_version = IO.read(Rails.root.join("git-commit.version")).strip
+ rescue SystemCallError
+ end
+end
+%>
+
# Below is a sample setting for diagnostics testing.
# Configure workbench URL as "arvados_workbench_url"
# Configure test user tokens as "user_tokens".
@@ -45,7 +69,7 @@ development:
assets.debug: true
profiling_enabled: true
site_name: Arvados Workbench (dev)
- local_modified: "<%= '-modified' if `git status -s` != '' %>"
+ local_modified: "<%= local_modified ? '-modified' : '' %>"
# API server configuration
arvados_login_base: ~
@@ -184,7 +208,7 @@ common:
user_profile_form_message: Welcome to Arvados. All <span style="color:red">required fields</span> must be completed before you can proceed.
# source_version
- source_version: "<%= `git log -n 1 --format=%h`.strip %>"
+ source_version: "<%= source_version[0...8] %>"
local_modified: false
# report notification to and from addresses
diff --git a/services/api/config/application.default.yml b/services/api/config/application.default.yml
index 51bc4f9..28ffddd 100644
--- a/services/api/config/application.default.yml
+++ b/services/api/config/application.default.yml
@@ -8,6 +8,30 @@
# 4. Section in application.default.yml corresponding to RAILS_ENV
# 5. Section in application.default.yml called "common"
+<%
+source_version = ""
+local_modified = false
+begin
+ status_output = false
+ IO.popen(["git", "status", "-s"], "r", err: [:child, :out]) do |git_pipe|
+ git_pipe.each_line do |_|
+ status_output = true
+ end
+ end
+ if $?.success?
+ source_version = `git log -n1 --format=%H`.strip
+ local_modified = status_output
+ else
+ raise SystemCallError.new("git exited #{$?.exitstatus}")
+ end
+rescue SystemCallError
+ begin
+ source_version = IO.read(Rails.root.join("git-commit.version")).strip
+ rescue SystemCallError
+ end
+end
+%>
+
common:
###
### Essential site configuration
@@ -327,7 +351,7 @@ common:
default_openid_prefix: https://www.google.com/accounts/o8/id
# source_version
- source_version: "<%= `git log -n 1 --format=%h`.strip %>"
+ source_version: "<%= source_version[0...8] %>"
local_modified: false
@@ -345,7 +369,7 @@ development:
active_record.auto_explain_threshold_in_seconds: 0.5
assets.compress: false
assets.debug: true
- local_modified: "<%= '-modified' if `git status -s` != '' %>"
+ local_modified: "<%= local_modified ? '-modified' : '' %>"
production:
force_ssl: true
commit 1a5f4965ece648936fe8cbb60d2c8b9075973141
Author: Brett Smith <brett at curoverse.com>
Date: Wed Sep 23 11:34:53 2015 -0400
6967: Remove trailing whitespace in Workbench's application.default.yml.
diff --git a/apps/workbench/config/application.default.yml b/apps/workbench/config/application.default.yml
index 744c0c3..c458a50 100644
--- a/apps/workbench/config/application.default.yml
+++ b/apps/workbench/config/application.default.yml
@@ -11,7 +11,7 @@
# template_uuid: is the uuid of the template to be executed
# input_paths: an array of inputs for the pipeline. Use either a collection's "uuid"
# or a file's "uuid/file_name" path in this array. If the pipeline does not require
-# any inputs, this can be omitted.
+# any inputs, this can be omitted.
# max_wait_seconds: max time in seconds to wait for the pipeline run to complete.
# Default value of 30 seconds is used when this value is not provided.
diagnostics:
@@ -151,7 +151,7 @@ common:
# Below is a sample setting of user_profile_form_fields config parameter.
# This configuration parameter should be set to either false (to disable) or
- # to an array as shown below.
+ # to an array as shown below.
# Configure the list of input fields to be displayed in the profile page
# using the attribute "key" for each of the input fields.
# This sample shows configuration with one required and one optional form fields.
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list