Skip to content
This repository has been archived by the owner on Dec 17, 2017. It is now read-only.

Commit

Permalink
Merge pull request #55 from anchor/deploy_update
Browse files Browse the repository at this point in the history
update deployment process
  • Loading branch information
glasnt committed Oct 16, 2014
2 parents 5d4869a + dbe0a8e commit afde768
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 5 deletions.
1 change: 0 additions & 1 deletion .gvb_version

This file was deleted.

6 changes: 5 additions & 1 deletion app/helpers/layouts/application_layout_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,11 @@ def version
rescue
v = File.read(".gvb_version") if File.exists?(".gvb_version")
end
link_to v, "https://github.com/anchor/machiavelli/releases/tag/v#{v}", target: "blank" if v
# If we got a version then use it to construct a link to the github tag of the same
if v
l = link_to v, "https://github.com/anchor/machiavelli/releases/tag/v#{v}", target: "blank" if v
return "version #{l} ".html_safe
end
end

# Flash message styling based on the error level
Expand Down
6 changes: 3 additions & 3 deletions app/views/partial/navbar/_settings_modal.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,9 @@
<div class="clearfix">&nbsp;</div>

<div class="modal-footer no_link" style="font-size: small">
Machiavelli version <%=version%>.
Developed by <a href="http://www.anchor.com.au"><i class="icon-anchor"></i></a>.
Fork it on <a href="https://github.com/anchor/machiavelli"><i class="icon-github"></i></a>.
Machiavelli <%=version%>|
Developed by <a href="http://www.anchor.com.au"><i class="icon-anchor"></i></a> |
Fork it on <a href="https://github.com/anchor/machiavelli"><i class="icon-github"></i></a>
</div>
</div></div></div>
</div>
3 changes: 3 additions & 0 deletions deploy
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ end
def deploy env
branch = git_branch
run "git checkout -b deploy_temp"
run "git version-bump show > .gvb_version"
run "git add #{@version_file}"
run "git commit #{@version_file} -m 'update #{@version_file}'"
run "bundle exec rake assets:precompile", { "RAILS_ENV" => env }
run "git add public/assets"
run "git commit public/assets -m'compile assets'"
Expand Down

0 comments on commit afde768

Please sign in to comment.