-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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 AppVeyor Configuration #1792
Conversation
I'm almost done, only some command-line outputs during |
@ljharb alright, I'm done 😄 |
@ljharb alright, I'm done now 😄 |
@manuth no; files related to your personal IDE should go in your personal global gitconfig, instead of adding them to every repo you touch :-) |
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.
Thanks!
Adding support for
WSL
to AppVeyor caused theappveyor.yml
file to look quite complicated.If applied, this PR will simplify the
appveyor.yml
-file by temporarily adding a Cmdlet for invoking commands either using.
(source) orwsl
depending on the current configuration.This allows us to use the same commands for both
WSL
andNative
, leaving onlyinstall
-commands as separate sections.Further Explanation
The
GetCI.psm1
-file contains a PowerShell function calledGet-CICommand
. This takes a string containing a command (such asnpm install
,sudo npm install -g rimraf
) and converts it for the appropriate platform:WSL
, awsl
is prependedExample:
sudo npm i -g rimraf
=>wsl sudo npm i -g rimraf
Windows
, if the first argument issudo
, it is removed as thesudo
command doesn't exist on windows and all commands on AppVeyor are executed as admin anyways.Example:
sudo npm i -g rimraf
=>npm i -g rimraf
Additionally the
ci.cmd
script is added to thePATH
-variable.The
ci
command accepts arguments representing a command (such asnpm install
,git reset
etc.), converts it for the appropriate platform usingGet-CICommand
(mentioned before) and executes the resulting command usingcmd /c
(a command similar tobash -c
)Related to #1786