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

Regarding nbgv.json #3

Closed
AArnott opened this issue Aug 18, 2019 · 3 comments · Fixed by #12
Closed

Regarding nbgv.json #3

AArnott opened this issue Aug 18, 2019 · 3 comments · Fixed by #12
Assignees
Labels
question Further information is requested

Comments

@AArnott
Copy link
Collaborator

AArnott commented Aug 18, 2019

Why does the action produce a nbgv.json file?
Is the root directory of the user's source tree the right place to create such a file, or does GitHub Actions define an artifacts directory that would be more appropriate?

@AArnott AArnott added the question Further information is requested label Aug 18, 2019
@ctaggart
Copy link
Contributor

nbgv.json is not needed. I recommend removing it:
https://github.com/AArnott/nbgv/blob/10e1135ef1d89a3db40c2eb571794f981411c326/src/main.ts#L28-L34

I'm not that familiar with nbgv cloud --all-vars, but if it is for setting the cloud variables, may be we should try setting them with it. The format is ##[set-env name=NBGV_SemVer2;]0.7.17-ga79541b. I'll try echoing that format to verify that it works. You could then avoid creating and reading the json and switch the command.

@AArnott
Copy link
Collaborator Author

AArnott commented Aug 19, 2019

Already done here: dotnet/Nerdbank.GitVersioning#378

I'd appreciate you testing it though!

@ctaggart
Copy link
Contributor

Yes, just echoing that to stdout works.

    - run: echo "##[set-env name=NBGV_SemVer2;]0.7.17-ga79541b"
    - run: echo "NBGV_SemVer2 $NBGV_SemVer2"

https://github.com/ctaggart/froto/runs/196810208
image

If you want me to test a beta build, you can add version and source input options to pass in here if set:
https://github.com/AArnott/nbgv/blob/10e1135ef1d89a3db40c2eb571794f981411c326/src/main.ts#L10

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants