Skip to content
This repository has been archived by the owner on May 7, 2022. It is now read-only.

Support ability to include commit URL #17

Closed
Korporal opened this issue May 19, 2017 · 7 comments
Closed

Support ability to include commit URL #17

Korporal opened this issue May 19, 2017 · 7 comments

Comments

@Korporal
Copy link

Hi,

I'm thinking about adding a new capability here, one that lets us specify (in the command args) the URL of our organization. Then because I already added support for getting repo name {repodir} it's possible to construct the URL to a commit and embed this in the ProductVersion attribute.

Do you have any concerns or reservations about this in general?

@ygoe
Copy link
Owner

ygoe commented May 19, 2017

I don't understand it. What is the URL of your organisation? Is that the fixed domain name of your company's web site? Why would that be dynamic? And what does it have to do with the absolute local path of the repo that was built from? (#14)

@Korporal
Copy link
Author

Korporal commented May 19, 2017

@ygoe - Hi,

I'm talking about my company's Github organization (e.g this is Microsoft's https://github.com/microsoft/ ) Making this a new command line option means that at runtime the tool can build a full URL for the commit:

e.g.

microsoft/vscode@0930016

This is the org url "https://github.com/Microsoft" and the repo name "vscode" (this is now supported) and the word "commit" and then we'd append the 8 chars of the commit ID "09300167".

Thus the tool could create this full URL and with another placeholder {commiturl} this could be included in the attribute and available to other tools.

I'm working on a shell extension tool that we can right-click-properties on a DLL here and it will display the details of the attribute it will also display (if present) this URL so the user sitting at a desktop can just click and be taken to the commit in Github !

We're are using this build stamp a lot here and its proving very useful to us in understanding and resolving questions about qa, prod etc.

This is where my pull requests are coming from, real world day to day use cases.

@ygoe
Copy link
Owner

ygoe commented May 19, 2017

Okay, but what's the difference if you just put that base URL as static text in your assembly version info? What advantage does it have to provide it to NetRevisionTool instead (after all it must be provided and cannot be automatically determined – which NetRevisionTool is all about) and have it passed through in that specific way?

@Korporal
Copy link
Author

@ygoe - OK yes you're quite right that is a simpler way to do it, I'm looking at this now too...

@Korporal
Copy link
Author

@ygoe - Yep I was being dumb! This required no change (other than stuff you'll see in my pending PRs) I just edited the AssemblyInfo,cs - everything we need is already there - also when the build data is echoed to Output window, you can ctrl-click the displayed URL and VS opens its browser window at the Github commit!

@Korporal
Copy link
Author

Korporal commented May 19, 2017

@ygoe - Bascially I just added this (for example) to the assembly info

https://github.com/ygoe/{repodir}/commit/{CHASH:16}

@ygoe
Copy link
Owner

ygoe commented May 19, 2017

Glad to hear it's working for you!

@ygoe ygoe closed this as completed May 19, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants