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

Add support for defining version tags instead of branches #372

Merged
merged 6 commits into from
Nov 27, 2020

Conversation

SenseException
Copy link
Member

Handles #369

@SenseException
Copy link
Member Author

I started to test a PoC with a temporary repository yesterday. If this is working, I'll finalize this draft and make a PR out of it.

@SenseException SenseException force-pushed the docs-of-tags branch 2 times, most recently from 9d1aa7c to 0f98b10 Compare November 21, 2020 01:14
Make test more readable and removes implicit order of calls. This should
also improve the documentation purpose of the test and its expected
result.
Usually the branchName values are equal between $version and $projectVersion
exept when branchName was omitted in the project's website config which
results in a null-value.
@SenseException SenseException marked this pull request as ready for review November 22, 2020 23:01
@SenseException
Copy link
Member Author

SenseException commented Nov 22, 2020

If no branchName is given or set to null, the latest tag will be used for the build of the docs. @morozov

Copy link
Member

@morozov morozov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you, @SenseException! Looking forward to being able to use this.

$command = sprintf(
'cd %s && git clean -xdf && git checkout tags/%s',
$this->getRepositoryPath($repositoryName),
$tagName
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Although it will be used only for doctrine-owned projects, it still makes sense to implement proper escaping of the command line arguments.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point. Done.

Copy link
Member

@greg0ire greg0ire left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was mentioned internally in Slack and using tags instead of branches is going to be a new additional configuration in .doctrine-project.json files.

So how does it work? Should we document that somewhere?

@SenseException
Copy link
Member Author

Omit branchName or set it to null. Then the newest tagname will be used ("newest" as the used method name suggested and manual tests showed).

Should we document that somewhere?

The documentation has no documentation 🤔
I should start to document .doctrine-project.json. At least as much as I know about it. I would like to create a separate PR for that.

Copy link
Member

@greg0ire greg0ire left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks OK as is.

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 this pull request may close these issues.

Add support for defining version tags instead of branches
3 participants