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

d2 --version does not work #202

Closed
FFengIll opened this issue Nov 25, 2022 · 6 comments
Closed

d2 --version does not work #202

FFengIll opened this issue Nov 25, 2022 · 6 comments

Comments

@FFengIll
Copy link

d2 --version print ????.

@alixander
Copy link
Collaborator

You must've built from source. The version is not a static variable in source.

It's read from Github releases at build time:

fetch_release_info() {

And then injected:
https://github.com/terrastruct/d2/blob/master/ci/release/_build.sh#L16

@nhooyr nhooyr closed this as not planned Won't fix, can't repro, duplicate, stale Nov 25, 2022
@gavin-ts
Copy link
Contributor

gavin-ts commented Nov 30, 2022

To reproduce:

  1. go install oss.terrastruct.com/d2/cmd/d2@latest
  2. d2 -v outputs ????

@nhooyr
Copy link
Contributor

nhooyr commented Nov 30, 2022

To clarify, this is expected behaviour. I'll change it to instead be HEAD so it's more clear. See #288

@nhooyr nhooyr reopened this Nov 30, 2022
@nhooyr
Copy link
Contributor

nhooyr commented Nov 30, 2022

Discussed with @gavin-ts and we decided we can fix this by having the release script update the version in lib/version.

@nhooyr
Copy link
Contributor

nhooyr commented Nov 30, 2022

For now we'll manually update. terrastruct/ci#16 tracks automating this.

Thanks for reporting @FFengIll and for @gavin-ts for bring attention.

@nhooyr nhooyr closed this as completed Nov 30, 2022
@gavin-ts
Copy link
Contributor

gavin-ts commented Dec 1, 2022

tested with @HEAD

% rm $(which d2)                                 
% go install oss.terrastruct.com/d2/cmd/d2@HEAD  
go: downloading oss.terrastruct.com/d2 v0.0.14-0.20221130235807-5fa80861ff17
% d2 --version
v0.0.13-HEAD

@nhooyr nhooyr added this to D2 Dec 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: No status
Development

No branches or pull requests

4 participants