Skip to content
New issue

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

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

Already on GitHub? # to your account

Add support for tagging releases #326

Closed
postmodern opened this issue Jul 1, 2015 · 3 comments
Closed

Add support for tagging releases #326

postmodern opened this issue Jul 1, 2015 · 3 comments

Comments

@postmodern
Copy link
Contributor

I would like to have mina git tag the local repository after a successful deploy. This would make it easier to track deploys and differences between them.

@d4be4st
Copy link
Member

d4be4st commented Jul 5, 2015

I would love a PR for this. We have little time to work continually on mina unfortunatelly but will take a look at a PR.

@hollodotme
Copy link

hollodotme commented Jun 4, 2016

Well, here is what I did:

  • Disabled mina's default git clone
  • Added a task "checkout_release":
desc "Checks out the current release tag"
task :checkout_release do
    queue %[git clone -b "#{branch}" "#{repository}" .]
    queue 'git fetch'
    # Read the latest tag an check it out
    queue %[git checkout `git describe --abbrev=0 --tags`]
end
  • Invoking the task in deploy do section:
desc "Deploys the current version to the server."
task :deploy => :environment do
  deploy do
    # Put things that will set up an empty directory into a fully set-up
    # instance of your project.
    invoke :'checkout_release'

    to :launch do
      invoke :'deploy:cleanup'
    end
  end
end

So, before deployment I just have to add a new tag to git and mina will check that out.

May not the most generic solution, but works for me, and maybe helps.

@d4be4st
Copy link
Member

d4be4st commented Jul 30, 2016

Closing this issue as we wont be adding this unless someone does a PR.

@d4be4st d4be4st closed this as completed Jul 30, 2016
# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

No branches or pull requests

3 participants