git describe
Before submitting your issue, please make sure that you've checked all of the checkboxes below.
- [x] You're running the latest release version of Deployer.
- [x] Ensure that you're running at least PHP 5.6.4, you can check this by running
php -v - [x] You've ran
composer install --no-devfrom the root of your installation. - [x] You've ran
npm install --productionfrom the root of your installation. - [x] You've ran
rm -rf bootstrap/cache/*from the root of your installation. - [x] 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
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)
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
@REBELinBLUE
I thought it was fetching the ZIP archive using API ? Not via Git clone?
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!
@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
@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
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!
@REBELinBLUE Any progress in making the tags for the describe commands? If not, maybe I can help?
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
Still happy to help too
git describe --tags
produces even nicer version of the app :) v2.2.1-3-ga0378503