Created
July 26, 2011 20:22
Setting up a development environment with chocolatey
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@echo off | |
SET DIR=%~dp0% | |
@PowerShell -NoProfile -ExecutionPolicy unrestricted -Command "& '%DIR%setup.ps1' %*" | |
pause |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### install chocolatey ### | |
iex ((new-object net.webclient).DownloadString("http://chocolatey.org/install.ps1")) | |
# install nuget and ruby if they are missing | |
cinstm nuget.commandline | |
cinstm ruby | |
#perform ruby updates and get gems | |
gem update --system | |
gem install rake | |
gem install bundler | |
#restore the nuget packages | |
$nugetConfigs = Get-ChildItem '.\' -Recurse | ?{$_.name -match "packages\.config"} | select | |
foreach ($nugetConfig in $nugetConfigs) { | |
Write-Host "restoring packages from $($nugetConfig.FullName)" | |
nuget install $($nugetConfig.FullName) /OutputDirectory packages | |
} | |
rake |
More good stuff here: https://github.com/chocolatey/chocolatey/wiki/DevelopmentEnvironmentSetup
The one in the wiki has added a bit of user interaction with default answers after a timeout so they can be run unattended.
More updated example here: https://gist.github.com/ferventcoder/3825023
I'm new to Ruby, and am confused by this this part of the script:
#restore the nuget packages
$nugetConfigs = Get-ChildItem '.\' -Recurse | ?{$_.name -match "packages\.config"} | select
foreach ($nugetConfig in $nugetConfigs) {
Write-Host "restoring packages from $($nugetConfig.FullName)"
nuget install $($nugetConfig.FullName) /OutputDirectory packages
}
Is this for a ruby development environment that is using nuget to manage the gems? I would think that a recursive call to Bundler would be more common. Or is this for some other purpose?
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Yes, the dependency chain is where uppercut is going. I have plans to take it there as well.