-
Notifications
You must be signed in to change notification settings - Fork 480
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
Makefile,*: use tailscale.com/cmd/mkversion #546
Conversation
29cc00f
to
e2b3b51
Compare
@@ -38,3 +38,5 @@ tailscale.jks | |||
libtailscale.aar | |||
libtailscale-sources.jar | |||
.DS_Store | |||
|
|||
tailscale.version |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I thought we were going to check this file in to the repo? Or did you not git add
it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was hoping to, but as it contains the local git sha as well, that would get stale, so I wanted to reduce the possibility of the file not being updated and the stale version information being included.
$(shell ./tool/go run tailscale.com/cmd/mkversion > tailscale.version) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oh, so we're still doing the full git clone pain, just hidden behind this tool
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah, at least we now are down to one implementation of that behavior though!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hah. lolsob.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updates
You can use the F-Droid woes bug: tailscale/tailscale#13850
5bc9fc0
to
9a98b16
Compare
$(shell ./tool/go run tailscale.com/cmd/mkversion > tailscale.version) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hah. lolsob.
@@ -38,7 +38,7 @@ android { | |||
minSdkVersion 26 | |||
targetSdkVersion 34 | |||
versionCode 241 | |||
versionName "1.77.12-ta8f9c0d6e-g753b8d3fb4b" | |||
versionName getVersionProperty("VERSION_LONG") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ooooh hell yeah
def getVersionProperty(key) { | ||
// tailscale.version is created / updated by the makefile, it is in a loosely | ||
// Makfile/envfile format, which is also loosely a properties file format. | ||
// make tailscale.version | ||
def versionProps = new Properties() | ||
versionProps.load(project.file('../tailscale.version').newDataInputStream()) | ||
return versionProps.getProperty(key).replaceAll('^\"|\"$', '') | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
groovy!
We've suffered misalignment in versioning and toolchain usage due to the shell invocations downstream of ./version/tailscale-version.sh, but also the whole version data scheme in the Makefile was quite complicated, and required synchronization in the build.grade. - Makfile no longer needs to be version aware itself. - A Makefile target tailscale.version refreshes a local cached output from tailscale.com/cmd/mkversion which is updated when go.mod / go.sum change. - build.gradle loads tailscale.version to get the version string. - ldflags are produced from tailscale.version via version-ldflags.sh Updates tailscale/tailscale#13850 Signed-off-by: James Tucker <[email protected]>
9a98b16
to
62e43af
Compare
The explicit target was removed during patch production, but the dependency wasn't removed from the clean action. Updates #546 Updates tailscale/tailscale#13850
The explicit target was removed during patch production, but the dependency wasn't removed from the clean action. Updates #546 Updates tailscale/tailscale#13850
The explicit target was removed during patch production, but the dependency wasn't removed from the clean action. Updates #546 Updates tailscale/tailscale#13850 Signed-off-by: James Tucker <[email protected]>
The explicit target was removed during patch production, but the dependency wasn't removed from the clean action. Updates #546 Updates tailscale/tailscale#13850 Signed-off-by: James Tucker <[email protected]>
The explicit target was removed during patch production, but the dependency wasn't removed from the clean action. Updates #546 Updates tailscale/tailscale#13850 Signed-off-by: James Tucker <[email protected]>
We've suffered misalignment in versioning and toolchain usage due to the
shell invocations downstream of ./version/tailscale-version.sh, but also
the whole version data scheme in the Makefile was quite complicated, and
required synchronization in the build.grade.
from tailscale.com/cmd/mkversion which is updated when go.mod / go.sum
change.
Updates tailscale/tailscale#13850