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 script to get version number from a git branch #53

Merged
merged 4 commits into from
Jan 15, 2024

Conversation

friedrichwilken
Copy link
Contributor

@friedrichwilken friedrichwilken commented Jan 12, 2024

Description

add a script that creates a version number from the current branch and the existing tags

  • add a script that creates a version number from the current branch and the existing tag

test

test scenario: on release-branch with corresponding tags

get current branch

$ git branch --show-current
release-1.0

get all tags that start with 1.0.

$ git tag -l "1.0.*"
1.0.3

run script:

$ ./get-version-from-branch.sh
1.0.4

test scenario: on release-branch without corresponding tags

get current branch

$ git branch --show-current
release-1.1

get all tags that start with 1.1

$ git tag -l "1.1.*"

run script:

$ ./get-version-from-branch.sh
1.1.0

test scenario: on main branch

get current branch

$ git branch --show-current
main

run script:

$ ./get-version-from-branch.sh
Not on a release branch.

Related issue(s)

kyma-project/eventing-manager#360

@friedrichwilken friedrichwilken requested a review from a team as a code owner January 12, 2024 13:30
@kyma-bot kyma-bot added cla: yes Indicates the PR's author has signed the CLA. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Jan 12, 2024
@friedrichwilken friedrichwilken self-assigned this Jan 12, 2024
@kyma-bot kyma-bot added the lgtm Looks good to me! label Jan 15, 2024
@kyma-bot kyma-bot merged commit 34bc2dc into kyma-project:main Jan 15, 2024
5 checks passed
@friedrichwilken friedrichwilken deleted the get-version-from-branch branch January 15, 2024 09:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla: yes Indicates the PR's author has signed the CLA. lgtm Looks good to me! size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Github action: create version number without manual input
3 participants