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 version checking workflow #202

Merged
merged 2 commits into from
Apr 3, 2024
Merged

Add version checking workflow #202

merged 2 commits into from
Apr 3, 2024

Conversation

szepeviktor
Copy link
Collaborator

Compares tagged version to Root::VERSION.

@szepeviktor szepeviktor requested a review from iamgergo April 2, 2024 15:15
-
name: "Check latest tagged version"
run: |
LATEST_TAG="$(git describe --tags --abbrev=0)"
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I'd like to send another PR with

LATEST_TAG="${{ github.ref_name }}"

@iamgergo
Copy link
Member

iamgergo commented Apr 3, 2024

Can you explain how does it work exactly?

@szepeviktor
Copy link
Collaborator Author

szepeviktor commented Apr 3, 2024

LATEST_TAG="$(git describe --tags --abbrev=0)"

Reads the latest git tag.

CURRENT_VERSION="v$(php -r 'require __DIR__."/src/Root.php"; echo Cone\Root\Root::VERSION;')"

Reads v + Root::VERSION constant.

Then errors out if the two are not the same.

@iamgergo iamgergo merged commit a72d6e7 into master Apr 3, 2024
19 checks passed
@iamgergo iamgergo deleted the szepeviktor-patch-2 branch April 3, 2024 06:52
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.

2 participants