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

Added %~dp0 to installs #16

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Added %~dp0 to installs #16

wants to merge 2 commits into from

Conversation

faniereynders
Copy link
Owner

Hopefully this finally fixes #12 and #15

@faniereynders
Copy link
Owner Author

@shanselman you're (not yet) a contributer, please have a look at this PR if you can 😁

@shanselman
Copy link
Collaborator

Testing...

@shanselman
Copy link
Collaborator

  1. the version.dat temp file should also be over in %dp0, not in the current dir.

  2. Same with download.dat.

  3. DownloadFile is wrong, as it takes a URL and a FILEname, not a full path+ file name. I'll make a small change.

@shanselman
Copy link
Collaborator

shanselman commented Aug 3, 2017

Try this instead of the DownloadFile() call. It'll give you a free progress bar.

powershell -Command "Import-Module BitsTransfer; Start-BitsTransfer -Source '%url%' -Destination '%exe%'"

@faniereynders
Copy link
Owner Author

Will give it a go, thank you!

BTW - you're now also a contributor @shanselman :)

@shanselman
Copy link
Collaborator

shanselman commented Aug 3, 2017

Also, I hear you about the tools and jq and all that, but I'm also wondering if:

C:\Users\scott> $url = "https://raw.githubusercontent.com/dotnet/core/master/release-notes/releases.json"
$j = Invoke-WebRequest -Uri $url | ConvertFrom-Json 
$j | select version-sdk

version-sdk            
-----------            
2.0.0-preview2-006497  
2.0.0-preview1-005977  
1.0.4                  
1.0.4                  
1.0.1                  
1.0.1                  
1.0.0-preview2-003156  
1.0.0-preview2.1-003177
1.0.0-preview2-003148  
1.0.0-preview2-003131  
1.0.0-preview2-003121  

I need to run, but I'll look more later?

@faniereynders
Copy link
Owner Author

That's great, thanks for your feedback @shanselman! My initial aim was to use almost no PowerShell, but I suppose it's an obvious choice. PS is just awesome. Maybe the whole thing should be PS scripts...

@shanselman
Copy link
Collaborator

Good question. Perhaps, but your cmd approach allows us to use cmd.exe (which I use a lot) so perhaps we do a hybrid to start? You've made it modular in that it needs to "get a json, extract latest version, put it in a file" and that means we can just remove the need for the \tools folder by using one line PowerShell commands as functions. Just like I replaced DownloadFile with a nicer one, but it still fits into the larger batch.

@neman
Copy link

neman commented Aug 3, 2017

If you use PS, you could place it on Powershell Gallery or Chocolatey, and make it more installer friendly (instead od copying scripts around)

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.

Issue with "dotnet sdk releases" (cmd version)
3 participants