Closed alisdair closed 9 years ago
Build failed on CircleCI because it couldn't find the git tag. I've got some ideas about how to make the tests' interactions with git a bit more robust. Will push another commit tomorrow.
Nice work! Thank you. Creative solution to the testing challenge! I left a few comments. @achambers may have others.
Thanks for the feedback! Pushed up a commit with fixes for your comments.
@achambers Anything else I can do on this PR? If you want me to squash the commits please let me know.
Hi @alisdair. Thanks for this. If you could squash the commits that'd be great. I'll merge when that's done.
Done, thanks!
Thanks mate
Adding a couple of key generators so that I can deprecate my pre-0.5.0 plugin.
Git Tag Commit constructs a revision key from the git tag and commit hash. Version Commit is similar, but uses the package.json version instead of the tag. Both use git-repo-info to retrieve the git info.
Note that the tests for the Git Commit key generator depend on this git repository having a most recent tag matching the (fairly arbitrary) regex/^v?\d+\.\d+\.\d+.*\+[0-9a-f]{8}$/
.I tried to add a fake git repository in the fixtures, but git refused to add the files. I couldn't think of any other way to test this code without introducing dependency injection of the git-repo-info function into the plugin config.Tests relating to git use some real git repositories as fixtures, with the
.git
directory renamed todotgit
so that we can add them to this repo, and some extraneous files removed to minimise the diff.I also haven't had a chance to try this for real yet, I don't have a v0.5.0 ember-cli-deploy branch on any of my projects. Submitting for feedback & guidance.
Thanks for all your work on ember-cli-deploy!