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

Failure after shallow clone via GitHub actions/checkout@v2 #1993

Closed
gitfool opened this issue Dec 16, 2019 · 8 comments · Fixed by #1966
Closed

Failure after shallow clone via GitHub actions/checkout@v2 #1993

gitfool opened this issue Dec 16, 2019 · 8 comments · Fixed by #1966

Comments

@gitfool
Copy link
Contributor

gitfool commented Dec 16, 2019

See actions/checkout#113. I presume GitVersion can't do anything about this, except maybe improve the error message at non-diagnostic verbosity, although that may be more of a Cake build issue?

@StanleyGoldman
Copy link
Contributor

This should be fixed by #1966

@StanleyGoldman
Copy link
Contributor

You can test it out by using the artifacts from that pull request in the appveyor artifacts from that PR.
https://ci.appveyor.com/project/GitTools/gitversion/builds/29570366/artifacts

@gitfool
Copy link
Contributor Author

gitfool commented Dec 17, 2019

@StanleyGoldman thanks for the heads up!

@gep13
Copy link
Member

gep13 commented Dec 17, 2019

@gitfool from the looks of your build script:

https://github.com/gitfool/Cake.Dungeon/blob/master/scripts/version.cake#L6

You aren't calling GitVersion with the buildserver argument, so I don't think that the work @StanleyGoldman is doing will take effect until to call that argument.

@matilote
Copy link

matilote commented Dec 17, 2019

GitVersion keeps failing on Github Actions due to

InvalidOperationException: Could not find a 'develop' or 'master' branch, neither locally nor remotely.

even after prior fetching all branches and tags.

It does work on pull requests without any errors.

@gitfool
Copy link
Contributor Author

gitfool commented Dec 26, 2019

@gep13 I'm looking at this just now and not sure about using buildserver as I also need the GitVersion variables for all builds. I guess there's no harm in calling GitVersion twice, as done in Cake.Recipe, although I'm wondering why it reads the environment variables when it overwrites them soon after. 🤔

@gep13
Copy link
Member

gep13 commented Dec 26, 2019

@gitfool running it twice shouldn't cause any problems. The first execution will cache the asserted version number into the local cache file, and the second execution will simply read from that file.

The Cake.Recipe logic could well be something that needs to be looked at again, it has gone through a number of iterations, and perhaps is now wrong.

gitfool added a commit to gitfool/Cake.Dungeon that referenced this issue Dec 26, 2019
gitfool added a commit to gitfool/Cake.Dungeon that referenced this issue Dec 26, 2019
@gitfool
Copy link
Contributor Author

gitfool commented Dec 26, 2019

@gep13 FTR, that makes no difference and it looks like I still need to avoid a shallow clone.

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

Successfully merging a pull request may close this issue.

4 participants