Skip to content

Commit

Permalink
Merge pull request #601 from PecanProject/fix-frozen-string
Browse files Browse the repository at this point in the history
create duplicate of environment variable
  • Loading branch information
robkooper authored Oct 11, 2018
2 parents 80460f4 + 854b061 commit 61ef1b8
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 1 deletion.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@ section for the next release.
For more information about this file see also [Keep a Changelog](http://keepachangelog.com/) .


## [5.0.4] - 2018-10-11

### Fixes

- #600 : Error when starting BETY as docker container due to frozen variable.

## [5.0.3] - 2018-09-28

### Fixes
Expand Down
2 changes: 1 addition & 1 deletion app/helpers/application_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ def commit_is_tagged?

def commit_tags
e = ENV['BETY_GIT_TAGS']
ref_names = e.nil? || e.empty? ? `git log --pretty=format:"%d" -1` : e
ref_names = e.nil? || e.empty? ? `git log --pretty=format:"%d" -1` : e.dup
if /tag/.match(ref_names).nil?
return ""
end
Expand Down
4 changes: 4 additions & 0 deletions hooks/build
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
#!/usr/bin/env sh

# so we can run script outside of docker hub
IMAGE_NAME=${IMAGE_NAME:-"pecan/bety:latest"}

# build the actual container
docker build \
--build-arg BETY_GIT_TAGS="$(git log --pretty=format:%d -1)" \
--build-arg BETY_GIT_BRANCH="$(git rev-parse --abbrev-ref HEAD)" \
Expand Down

0 comments on commit 61ef1b8

Please sign in to comment.