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

Set version based on git tags. #339

Merged

Conversation

Random-Liu
Copy link
Contributor

I want to release a 1.11.1 from release/1.11. However, I don't know whether I should only update the version number in release/1.11 or update both release/1.11 and master.

If we only update release/1.11, master will still stay at 1.11.0.
But if we update both, master isn't actually at 1.11.1.

This PR changes to use git tags instead, which contains commit number for non-tag commits.

@yujuhong @feiskyer
Signed-off-by: Lantao Liu lantaol@google.com

@k8s-ci-robot k8s-ci-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Jul 11, 2018
@Random-Liu Random-Liu added this to the v1.11.1 milestone Jul 11, 2018
package version

// Version holds the complete version number. Filled in at linking time.
var Version = "1.11.0+unknown"
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we need to keep updating this Version?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That's how containerd does it. We can keep this as a simple unknown string. :)

Copy link
Contributor

Choose a reason for hiding this comment

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

This looks like a placeholder so I just wondered what we're going to do with it

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'll change this to unknown.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.

@yujuhong
Copy link
Contributor

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jul 11, 2018
Signed-off-by: Lantao Liu <lantaol@google.com>
@k8s-ci-robot
Copy link
Contributor

New changes are detected. LGTM label has been removed.

@k8s-ci-robot k8s-ci-robot removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jul 11, 2018
@Random-Liu
Copy link
Contributor Author

Apply LGTM based on #339 (comment)

@Random-Liu Random-Liu added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jul 11, 2018
@Random-Liu Random-Liu merged commit f0cc060 into kubernetes-sigs:master Jul 11, 2018
@Random-Liu Random-Liu deleted the set-version-with-git-tag branch July 11, 2018 23:13
@feiskyer
Copy link
Member

LGTM.

This was referenced Jul 13, 2018
feiskyer added a commit that referenced this pull request Jul 13, 2018
@ncdc
Copy link
Contributor

ncdc commented Aug 8, 2018

@Random-Liu does hack/release.sh need to be updated to set the ldflags with the version info?

@feiskyer
Copy link
Member

feiskyer commented Aug 9, 2018

yep, @ncdc would you like make a PR for that?

@ncdc
Copy link
Contributor

ncdc commented Aug 9, 2018 via email

@ncdc
Copy link
Contributor

ncdc commented Aug 9, 2018

PR is #367

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. 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.

5 participants