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

git describe #370

Open
cerw opened this Issue Apr 10, 2018 · 9 comments

Comments

3 participants
@cerw

cerw commented Apr 10, 2018

Before submitting your issue, please make sure that you've checked all of the checkboxes below.

  • You're running the latest release version of Deployer.
  • Ensure that you're running at least PHP 5.6.4, you can check this by running php -v
  • You've ran composer install --no-dev from the root of your installation.
  • You've ran npm install --production from the root of your installation.
  • You've ran rm -rf bootstrap/cache/* from the root of your installation.
  • You have restarted the queue listener and node socket server.

Hi there,

This is more request for a feature or just talk. I want to export git describe before compiling npm run dev so i can use this variable inside of Laravel or Vue.js app. But Deployer downlaod the file via ZIP so there is no access to git repo.

How can I solve this? I can only see sha variable in commands.

Thanks

P

@REBELinBLUE

This comment has been minimized.

Show comment
Hide comment
@REBELinBLUE

REBELinBLUE Apr 19, 2018

Owner

Hey, sorry for the late reply, can you show me what git describe does, can't seem to get it working.

The git repo is available on the deployer server so in theory I can create a variable with the content of the output

(it keeps a mirror of it then uses git archive and uploads that, it use to clone the repo on the servers but if you had a large repo as we did at work at the time it took a very long time to deploy as it cloned a new copy each time)

Owner

REBELinBLUE commented Apr 19, 2018

Hey, sorry for the late reply, can you show me what git describe does, can't seem to get it working.

The git repo is available on the deployer server so in theory I can create a variable with the content of the output

(it keeps a mirror of it then uses git archive and uploads that, it use to clone the repo on the servers but if you had a large repo as we did at work at the time it took a very long time to deploy as it cloned a new copy each time)

@cerw

This comment has been minimized.

Show comment
Hide comment
@cerw

cerw Apr 19, 2018

Hi @REBELinBLUE ,

if you use tags and branches then it looks like this:

1.0.9-292-ge72b455

Be great to be able to run some git command or expose this in ENV?

Thanks

cerw commented Apr 19, 2018

Hi @REBELinBLUE ,

if you use tags and branches then it looks like this:

1.0.9-292-ge72b455

Be great to be able to run some git command or expose this in ENV?

Thanks

@cerw

This comment has been minimized.

Show comment
Hide comment
@cerw

cerw Apr 26, 2018

@REBELinBLUE

I thought it was fetching the ZIP archive using API ? Not via Git clone?

cerw commented Apr 26, 2018

@REBELinBLUE

I thought it was fetching the ZIP archive using API ? Not via Git clone?

@mdriessen

This comment has been minimized.

Show comment
Hide comment
@mdriessen

mdriessen Apr 30, 2018

I'm looking for something similar, except for the command 'git describe --tags --long'. It generates a similar version string except it also looks at lightweight tags and outputs the hash even when on the commit tag.

If I could write the output to a file on de remote server that would be great!

mdriessen commented Apr 30, 2018

I'm looking for something similar, except for the command 'git describe --tags --long'. It generates a similar version string except it also looks at lightweight tags and outputs the hash even when on the commit tag.

If I could write the output to a file on de remote server that would be great!

@REBELinBLUE

This comment has been minimized.

Show comment
Hide comment
@REBELinBLUE

REBELinBLUE Apr 30, 2018

Owner

@cerw No because that isn't a standard git feature, it is specific to the github/bitbucket/gitlab etc APIs so wouldn't work with things like plan old self hosted git repostiries. See resources/scripts/deploy/CreateReleaseArchive.sh to see what it does

Owner

REBELinBLUE commented Apr 30, 2018

@cerw No because that isn't a standard git feature, it is specific to the github/bitbucket/gitlab etc APIs so wouldn't work with things like plan old self hosted git repostiries. See resources/scripts/deploy/CreateReleaseArchive.sh to see what it does

@REBELinBLUE

This comment has been minimized.

Show comment
Hide comment
@REBELinBLUE

REBELinBLUE Apr 30, 2018

Owner

@mdriessen Makes sense, I'll have a look at adding 2 more tags for those 2 cases tomorrow but I think I need to look at a way to run commands on the deployer server to create other tags because no doubt there will be more needed at some point

Owner

REBELinBLUE commented Apr 30, 2018

@mdriessen Makes sense, I'll have a look at adding 2 more tags for those 2 cases tomorrow but I think I need to look at a way to run commands on the deployer server to create other tags because no doubt there will be more needed at some point

@mdriessen

This comment has been minimized.

Show comment
Hide comment
@mdriessen

mdriessen May 1, 2018

Custom tags sounds like a great feature but adding a tag for the describe command would be sufficient for my use case. Thanks for your help!

mdriessen commented May 1, 2018

Custom tags sounds like a great feature but adding a tag for the describe command would be sufficient for my use case. Thanks for your help!

@mdriessen

This comment has been minimized.

Show comment
Hide comment
@mdriessen

mdriessen May 29, 2018

@REBELinBLUE Any progress in making the tags for the describe commands? If not, maybe I can help?

mdriessen commented May 29, 2018

@REBELinBLUE Any progress in making the tags for the describe commands? If not, maybe I can help?

@REBELinBLUE

This comment has been minimized.

Show comment
Hide comment
@REBELinBLUE

REBELinBLUE May 29, 2018

Owner

Really sorry, I started on it and then hit a bit of a roadblock (trying to figure out what to do if you aren't using a tag) and then got really busy at work. Willing to accept PRs if you want to take a look, if not hopefully I will get time this week to look into it

Owner

REBELinBLUE commented May 29, 2018

Really sorry, I started on it and then hit a bit of a roadblock (trying to figure out what to do if you aren't using a tag) and then got really busy at work. Willing to accept PRs if you want to take a look, if not hopefully I will get time this week to look into it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment