Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is there a good way to tag deployed git sha with the current release version? #378

Closed
twe4ked opened this issue Apr 11, 2016 · 3 comments
Closed

Comments

@twe4ked
Copy link

twe4ked commented Apr 11, 2016

Title. Thanks.

@devvmh
Copy link
Contributor

devvmh commented Jul 6, 2016

I think the best way would be this:

  1. mina deploy --simulate > script.sh
  2. Take a look at the script, and decide where you want your command to go.
  3. Figure out how to do what you want in a shell command, for instance, it might be something like VERSION=$(cat version.txt) git tag -a -m "$VERSION" HEAD; git push --tags
  4. add a line in the appropriate spot to config/deploy.rb saying queue %( VERSION=$(cat version.txt) git tag -a -m "$VERSION" HEAD; git push --tags )

Wouldn't that solve the problem?

@d4be4st
Copy link
Member

d4be4st commented Jul 8, 2016

@twe4ked current sha is saved in #{deploy_to}/scm/FETCH_HEAD

we use this little command in :launch

cut -c-10 #{deploy_to}/scm/FETCH_HEAD > #{deploy_to}/#{current_path}/public/version.txt

@d4be4st d4be4st closed this as completed Jul 8, 2016
@twe4ked
Copy link
Author

twe4ked commented Jul 11, 2016

Thanks @devvmh and @d4be4st!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants