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

Sdk automation script #585

Closed
wants to merge 20 commits into from
Closed

Sdk automation script #585

wants to merge 20 commits into from

Conversation

ShivangiReja
Copy link

@ShivangiReja ShivangiReja commented Nov 19, 2020

For reference please checkout the generateOutput.json here

if($line -match "[\/][0-9a-f]{4,40}[\/]$inputFile")
{
# replacing sha
$line = $line -replace "[\/][0-9a-f]{4,40}[\/]$inputFile", "/$headSha/$inputFile"

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we ever end up allowing branches or tags we might need to update this regex.

$readmeMd = @()
if($packageName -match "Azure.ResourceManager")
{
$readmeMd += $name -match "resource-plane"

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These path names might not be something we should rely on. Don't we know which readme's based on the matching input files in the readmes?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've updated the script and added readme's based on the matching readme input files but now in order to add readme path in output json, it expects readme.md as an input file in autorest.md. Currently for few SDKs we use directly spec(json file) as an input file. I have already created an issue to use readmes in autorest.md.


$downloadUrlPrefix = $input.installInstructionInput.downloadUrlPrefix
$installInstructions = [PSCustomObject]@{
full = "Download the $packageName from [here]($downloadUrlPrefix)"

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure that link will work so we should test to see what it does. I was expecting we would need to add the package name to the download line as well to get this link to be useful.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes it should be prefix + filename

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated!

@@ -0,0 +1,976 @@
#

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need to check-in this entire script? Or should we use the well known version, similar to what the .NET team does, see https://github.com/dotnet/runtime/blob/master/eng/common/tools.ps1#L193 as an example.

It might also be better to read the version from the global.json file similar to what they do in as well https://github.com/dotnet/runtime/blob/master/eng/common/tools.ps1#L140.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ahh, that's nice! Thanks for the suggestion.

@azure-sdk azure-sdk force-pushed the master branch 5 times, most recently from 6498326 to 25e7298 Compare November 24, 2020 15:06
@ShivangiReja
Copy link
Author

Hi @weshaggard, when I was creating this PR I thought I'll move this PR to azure-sdk-for-net repo once I'll do the cleanup but now I'm not able to change the base repo as Azure/azure-sdk-for-net in this PR, that's why I've to create a new PR in azure-sdk-for-net repo here; so that others can also take a look at it. I resolved all the comments in this PR. Hence closing this PR.

Please review and give further feedback here. Sorry for all the inconvenience.

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

Successfully merging this pull request may close these issues.

3 participants