Skip to content

Commit

Permalink
winters udpate
Browse files Browse the repository at this point in the history
  • Loading branch information
mh-cbon committed Jan 8, 2017
1 parent 9e64029 commit c2c6c3f
Showing 1 changed file with 16 additions and 18 deletions.
34 changes: 16 additions & 18 deletions demo/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,50 +25,48 @@ cp -r ../templates .
vagrant winrm -c "mkdir C:\\go-msi\\templates"
vagrant winrm -c 'Copy-Item C:\\vagrant\\templates\\* -destination C:\\go-msi\\templates\\ -recurse -Force'
vagrant winrm -c 'COPY C:\\vagrant\\go-msi.exe C:\\go-msi\\'
rm -fr templates
rm -fr go-msi.exe
rm -fr templates go-msi.exe

# setup wix
wget -O wix310-binaries.zip http://wixtoolset.org/downloads/v3.10.3.3007/wix310-binaries.zip
unzip wix310-binaries.zip -d wix310
vagrant winrm -c "xcopy /E /I C:\vagrant\wix310 C:\wix310"
vagrant winrm -c "setx PATH \"%PATH%;C:\\wix310\""
rm -fr wix310
rm -fr wix310*zip
rm -fr wix310 wix310*zip

# setup the repo
vagrant winrm -c "mkdir C:\\gow\\src\\mh-cbon\\github.com\\demo"
vagrant winrm -c 'Copy-Item C:\\vagrant\\* -destination C:\\gow\\src\\mh-cbon\\github.com\\demo\\ -recurse -Force'
vagrant winrm -c 'Dir C:\\gow\\src\\mh-cbon\\github.com\\demo\\'
vagrant winrm -c "mkdir C:\\gow\\src\\github.com\\mh-cbon\\demo"
vagrant winrm -c 'Copy-Item C:\\vagrant\\* -destination C:\\gow\\src\\github.com\\mh-cbon\\demo\\ -recurse -Force'
vagrant winrm -c 'Dir C:\\gow\\src\\github.com\\mh-cbon\\demo\\'

# generate the build
vagrant winrm -c "mkdir C:\\gow\\src\\mh-cbon\\github.com\\demo\\build\\amd64"
vagrant winrm -c 'cmd.exe /c "cd C:\\gow\\src\\mh-cbon\\github.com\\demo\\ && go build -o build\\amd64\\hello.exe hello.go"'
vagrant winrm -c "mkdir C:\\gow\\src\\github.com\\mh-cbon\\demo\\build\\amd64"
vagrant winrm -c 'cmd.exe /c "cd C:\\gow\\src\\github.com\\mh-cbon\\demo\\ && go build -o build\\amd64\\hello.exe hello.go"'
# generate the package
vagrant winrm -c 'cmd.exe /c "cd C:\\gow\\src\\mh-cbon\\github.com\\demo\\ && C:\\go-msi\\go-msi.exe make --msi hello.msi --version 0.0.1 --arch amd64"'
vagrant winrm -c 'cmd.exe /c "cd C:\\gow\\src\\github.com\\mh-cbon\\demo\\ && C:\\go-msi\\go-msi.exe make --msi hello.msi --version 0.0.1 --arch amd64"'
# install software
vagrant winrm -c "msiexec.exe /i C:\\gow\\src\\mh-cbon\\github.com\\demo\\hello.msi /quiet"
vagrant winrm -c "msiexec.exe /i C:\\gow\\src\\github.com\\mh-cbon\\demo\\hello.msi /quiet"
vagrant winrm -c "ls env:some"
vagrant winrm -c 'Dir "C:\Program Files"'
vagrant winrm -c 'Dir "C:\Program Files\hello"'
vagrant winrm -c 'Dir "C:\Program Files\hello\assets"'
# start the server, then use ie to browse http://localhost:8080/
vagrant winrm -c '. "C:\Program Files\hello\hello.exe"'
# uninstall software
vagrant winrm -c "msiexec.exe /uninstall C:\\gow\\src\\mh-cbon\\github.com\\demo\\hello.msi /quiet"
vagrant winrm -c "msiexec.exe /uninstall C:\\gow\\src\\github.com\\mh-cbon\\demo\\hello.msi /quiet"
```


"C:\Windows\System32\msiexec.exe" /i "C:\ProgramData\chocolatey\lib\hello\tools\hello.msi" /quiet
# setup chocolatey
```sh
vagrant winrm -c 'iwr https://chocolatey.org/install.ps1 -UseBasicParsing | iex'
```

# generate chocolatey package
```sh
vagrant winrm -c "cmd.exe /c 'cd C:\\gow\\src\\mh-cbon\\github.com\\demo\\ && C:\\go-msi\\go-msi.exe choco --input hello.msi --version 0.0.1 -c \"changelog ghrelease --version 0.0.1\"'"
vagrant winrm -c 'COPY C:\\gow\\src\\mh-cbon\\github.com\\demo\\hello.0.0.1.nupkg C:\\vagrant\\'
vagrant winrm -c 'cmd.exe /c "cd C:\\gow\\src\\mh-cbon\\github.com\\demo\\ && choco install hello.0.0.1.nupkg -y"'
vagrant winrm -c 'cmd.exe /c "cd C:\\gow\\src\\mh-cbon\\github.com\\demo\\ && choco uninstall hello -y"'
vagrant winrm -c "cmd.exe /c \"cd C:\\gow\\src\\mh-cbon\\github.com\\demo\\ && choco push -k=\"'xxx'\" hello.0.0.1.nupkg\""
vagrant winrm -c "cmd.exe /c 'cd C:\\gow\\src\\github.com\\mh-cbon\\demo\\ && C:\\go-msi\\go-msi.exe choco --input hello.msi --version 0.0.1 -c \"changelog ghrelease --version 0.0.1\"'"
vagrant winrm -c 'COPY C:\\gow\\src\\github.com\\mh-cbon\\demo\\hello.0.0.1.nupkg C:\\vagrant\\'
vagrant winrm -c 'cmd.exe /c "cd C:\\gow\\src\\github.com\\mh-cbon\\demo\\ && choco install hello.0.0.1.nupkg -y"'
vagrant winrm -c 'cmd.exe /c "cd C:\\gow\\src\\github.com\\mh-cbon\\demo\\ && choco uninstall hello -y"'
vagrant winrm -c "cmd.exe /c \"cd C:\\gow\\src\\github.com\\mh-cbon\\demo\\ && choco push -k=\"'xxx'\" hello.0.0.1.nupkg\""
```

0 comments on commit c2c6c3f

Please sign in to comment.