Commit Graph

9 Commits (77eaadb360d7bd7468166bbe79ce978418af5186)

Author SHA1 Message Date
Denton Gentry 33a2eb0dee
version: handle whitespace in ${mod_version} (#141)
5ca195b109 changed the shell code
to determine the OSS module version:
-mod_version=${go_list##* }
+mod_version=${go_list#tailscale.com}

The intent is fine but the original code also consumed a whitespace
from the go.mod content:
        tailscale.com v1.52.0
original: "v1.52.0"
updated:  " v1.52.0"

At least for me, "make tag_release" no longer works:
    error: pathspec ' v1.54.0' did not match any file(s) known to git
Note the extra space at the start of the pathspec.

It is apparently not broken for everyone, possibly related to
versions of other tools I have installed like maybe git.

I don't want to just put the whitespace trimming back the way it
was, that seems fragile. Instead, quote ${mod_version} in a way
which won't be sensitive to extra whitespace.

Signed-off-by: Denton Gentry <dgentry@tailscale.com>
1 year ago
James Tucker 5ca195b109
version: fix result from tailscale-version.sh when not using a git source (#117)
If the developer has used `go mod vendor` or `go work use ../tailscale`
then the version script was returning "tailscale.com" instead of hitting
the error case.

This now makes the outcome with the Makefile slightly worse, which needs
to be fixed up next.

Updates #cleanup
1 year ago
Denton Gentry f25f7ecc80 tailscale-version.sh: adjust version format.
Use the same version number format as other platforms.

Signed-off-by: Denton Gentry <dgentry@tailscale.com>
3 years ago
Denton Gentry 67c2869ec6 tailscale-version.sh: always use bash
We specify `set -o pipefail`, which is not implemented in dash
or a number of other shells. The F-Droid builder is defaulting
to a shell which does not:
```
./version/tailscale-version.sh: 10: set: Illegal option -o pipefail
```

Updates https://github.com/tailscale/tailscale/issues/2536

Signed-off-by: Denton Gentry <dgentry@tailscale.com>
3 years ago
Denton Gentry 85ed50317d Update for 1.11 unstable release.
Use OSS version in tailscale-version.sh

Signed-off-by: Denton Gentry <dgentry@tailscale.com>
3 years ago
Elias Naur 47b732aaab Makefile,version: update versioning scheme to match main repository
Signed-off-by: Elias Naur <mail@eliasnaur.com>
3 years ago
Elias Naur 96e2661764 version: determine tailscale.com version by cloning it and running version.sh
Updates tailscale/tailscale#1158

Signed-off-by: Elias Naur <mail@eliasnaur.com>
4 years ago
Elias Naur 2b38d32130 go.*: upgrade to Tailscale 1.2.2
Also revert the "0.0.0" hack that made mkversion.sh complain.

Fixes tailscale/tailscale#883

Signed-off-by: Elias Naur <mail@eliasnaur.com>
4 years ago
Elias Naur 5a581c1a9d version,Makefile: implement new Tailscale versioning scheme
The strategy is to ask `go list` for the tailscale.com module version, and then
use that as a tag in a `git ls-remote` query.

If the module version is a pseudo-version such as
"v1.1.1-0.20201030135043-eab6e9ea4e45", use the abbreviated commit directly
(git ls-remote only list remote refs, not commits).

Fixes tailscale/tailscale#883

Signed-off-by: Elias Naur <mail@eliasnaur.com>
4 years ago