-
-
Notifications
You must be signed in to change notification settings - Fork 197
Improve Setup Scripts #1616
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
Improve Setup Scripts #1616
Conversation
# To run it inside a COMMAND PROMPT against the production branch (only one supported with self-elevation) use | ||
# @powershell -NoProfile -ExecutionPolicy Bypass -Command "iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/NativeScript/nativescript-cli/production/setup/native-script.ps1'))" | ||
# To run it inside a WINDOWS POWERSHELL console against the production branch (only one supported with self-elevation) use | ||
# start-process -FilePath PowerShell.exe -NoNewWindow -Wait -ArgumentList "-NoProfile -ExecutionPolicy Bypass -Command iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/NativeScript/nativescript-cli/production/setup/native-script.ps1'))" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well, you are inside a powershell, why are you running another one? What about simply executing:
iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/NativeScript/nativescript-cli/production/setup/native-script.ps1'))
?
470d30d
to
4297adf
Compare
run ci |
48c459c
to
646ae0f
Compare
Changes include: * Asking permission from user for every installation - this includes an `all` option for eliminating subsequent questions * Improved error handling - warning upon non-zero exit code, error if the command execution fails * Adding `-V` option for `sudo gem install cocoapods`. This triggers a verbose output * Outputting multiple license acceptances for android tools * Creating ~/.cocoapods directory in case it does not exist
646ae0f
to
2882233
Compare
Ping @teobugslayer with fixed comments |
$latestDotNetVersion = $dotNetVersions.GetEnumerator() | Sort-Object Version | Select-Object -Last 1 | ||
$latestDotNetMajorNumber = $latestDotNetVersion.Version.Split(".")[0] | ||
if ($latestDotNetMajorNumber -lt 4) { | ||
Write-Host -ForegroundColor Red "Running this script requires at least a version 4.0 .NET framework installed" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
From Iva: "To run this script, you need .NET 4.0 or later installed"
Fix the messages, squash the commits and merge it! 👍 and excellent work! |
Changes include: * Asking permission from user for every installation - this includes an `all` option for eliminating subsequent questions * Improved error handling - warning upon non-zero exit code * Initial check for latest .NET Framework installed - should be at least 4 * Check for correct Chocolatey installation * Fixed the syntax in docs header on invoking the setup script from the command prompt * Added example syntax in docs header for invoking the setup script from powershell itself
If `$ tns doctor` detects any problems prompt the user to open docs and/or to run the setup script for his OS (if available). Default answers to both questions set to NO for NON-interactive consoles automation purposes. Default answers are set to YES for interactive consoles.
2882233
to
ab2e132
Compare
Improve Setup Scripts:
Mac:
all
option for eliminating subsequent questions-V
option forsudo gem install cocoapods
. This triggers a verbose outputWindows:
all
option for eliminating subsequent questionsDoctor command:
Addresses some parts of NativeScript/NativeScript#1556
Ping @rosen-vladimirov and @teobugslayer