-
Notifications
You must be signed in to change notification settings - Fork 82
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #321 from redhatrises/win_msi
Add Windows MSI packaging
- Loading branch information
Showing
6 changed files
with
110 additions
and
23 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,61 @@ | ||
version: 1.0.{build} | ||
branches: | ||
only: | ||
- master | ||
clone_folder: c:\gopath\src\github.com\opencontrol\compliance-masonry | ||
environment: | ||
GOPATH: c:\gopath | ||
install: | ||
- cmd: >- | ||
echo %GOPATH% | ||
go version | ||
go env | ||
go get github.com/Masterminds/glide | ||
set PATH=%PATH%;%GOPATH%\bin | ||
build_script: | ||
- cmd: go build cmd/compliance-masonry/compliance-masonry.go | ||
- cmd: go build cmd/masonry/masonry.go | ||
test_script: | ||
- cmd: FOR /F %%A IN ('glide novendor') DO go test -v %%A || exit /b 1 | ||
version: 1.0.{build} | ||
|
||
branches: | ||
only: | ||
- master | ||
clone_folder: c:\gopath\src\github.com\opencontrol\compliance-masonry | ||
|
||
environment: | ||
GOPATH: c:\gopath | ||
|
||
install: | ||
- choco install gnuwin32-sed.install | ||
- cmd: >- | ||
echo %GOPATH% | ||
go version | ||
go env | ||
go get github.com/Masterminds/glide | ||
set PATH=%PATH%;%GOPATH%\bin | ||
- ps: >- | ||
$env:GITVERSION = git describe --abbrev=0 --tags | ||
$env:VERSION = $env:GITVERSION -replace 'v', '' | ||
$env:SHORTCOMMIT = git rev-parse --short HEAD | ||
$env:BUILD_INFO = date -u +"%Y-%m-%dT%T%z" | ||
build_script: | ||
- cmd: go build -ldflags="-s -w -X github.com/opencontrol/compliance-masonry/version.Version=%VERSION% -X github.com/opencontrol/compliance-masonry/version.Commit=%SHORTCOMMIT% -X github.com/opencontrol/compliance-masonry/version.Date=%BUILD_INFO%" cmd/compliance-masonry/compliance-masonry.go | ||
|
||
- cmd: go build -ldflags="-s -w -X github.com/opencontrol/compliance-masonry/version.Version=%VERSION% -X github.com/opencontrol/compliance-masonry/version.Commit=%SHORTCOMMIT% -X github.com/opencontrol/compliance-masonry/version.Date=%BUILD_INFO%" cmd/masonry/masonry.go | ||
|
||
- cmd: copy build\msi\*.* %cd% | ||
- cmd: >- | ||
sed.exe -i "s/BUILD_TAG_VERSION/%VERSION%/g" compliance-masonry.wxs | ||
"%WIX%\bin\candle.exe" compliance-masonry.wxs | ||
"%WIX%\bin\light.exe" compliance-masonry.wixobj -ext WixUIExtension -out compliance-masonry-%VERSION%.msi | ||
artifacts: | ||
- path: compliance-masonry-%VERSION%.msi | ||
|
||
test_script: | ||
- cmd: FOR /F %%A IN ('glide novendor') DO go test -v %%A || exit /b 1 | ||
|
||
deploy: | ||
provider: GitHub | ||
auth_token: | ||
secure: Bh508YJt4bqzyu1oSqCFzzvGVNw379clxakvtGErRWoTG+4HkyvrVJyH80LAhMf2 | ||
artifact: compliance-masonry-%VERSION%.msi | ||
draft: false | ||
prerelease: false | ||
on: | ||
branch: master | ||
appveyor_repo_tag: true |
Binary file not shown.
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"> | ||
<?define VERSION="BUILD_TAG_VERSION.0" ?> | ||
<Product Id="FA288837-AD79-40CC-9A49-C08E36216B46" Name="Compliance Masonry" Language="1033" Version="$(var.VERSION)" Manufacturer="OpenControl" UpgradeCode="A53A584E-4A8F-45AB-95D6-0B76FA326CBB"> | ||
<Package Description="Compliance Masonry" Comments="Compliance Masonry" InstallerVersion="200" Compressed="yes" InstallPrivileges="elevated" InstallScope="perMachine" /> | ||
<Media Id="1" Cabinet="simple.cab" EmbedCab="yes" /> | ||
<Directory Id="TARGETDIR" Name="SourceDir"> | ||
<Directory Id="ProgramFilesFolder" Name="PFiles"> | ||
<Directory Id="COMPLIANCE_MASONRY" Name="compliance-masonry"> | ||
|
||
<Component Id="MASONRY.EXE" DiskId="1" Guid="BAC035C9-8CC3-4D21-A644-73DA77DE9C4A"> | ||
<File Id="MASONRY.EXE" Name="masonry.exe" Source="masonry.exe" Vital="yes" KeyPath="yes" /> | ||
</Component> | ||
|
||
<Component Id="COMPLIANCE_MASONRY.EXE" DiskId="1" Guid="E26DA70A-738B-4263-AFDD-BD85C25C53DA"> | ||
<File Id="COMPLIANCE_MASONRY.EXE" Name="compliance-masonry.exe" Source="compliance-masonry.exe" /> | ||
</Component> | ||
|
||
</Directory> | ||
</Directory> | ||
<Directory Id="DesktopFolder" /> | ||
<Directory Id="ProgramMenuFolder"> | ||
<Directory Id="ProgramMenuDir" Name="OpenControl"> | ||
<Directory Id="OpenControlDir" Name="compliance-masonry"> | ||
<Component Id="StartMenuShortcuts" Guid="1175B1B2-E425-432C-8D28-E31CC947F368"> | ||
<RemoveFolder Id="RemoveProgramMenuDir" Directory="ProgramMenuDir" On="uninstall" /> | ||
<RemoveFolder Id="RemoveOpenControlDir" Directory="OpenControlDir" On="uninstall" /> | ||
<RegistryValue Root="HKMU" Key="Software\[Manufacturer]\[ProductName]" Name="installed" Type="integer" Value="1" /> | ||
<RegistryValue Root="HKMU" Key="Software\[Manufacturer]\[ProductName]" Name="version" Type="string" Value="$(var.VERSION)" /> | ||
</Component> | ||
</Directory> | ||
</Directory> | ||
</Directory> | ||
</Directory> | ||
<Feature Id="DefaultFeature" Title="Compliance Masonry" Level="1"> | ||
<ComponentRef Id="MASONRY.EXE" /> | ||
<ComponentRef Id="COMPLIANCE_MASONRY.EXE" /> | ||
|
||
<ComponentRef Id="StartMenuShortcuts" /> | ||
</Feature> | ||
<UI /> | ||
<UIRef Id="WixUI_Minimal" /> | ||
<Icon Id="AppIcon.ico" SourceFile="AppIcon.ico" /> | ||
<Property Id="ARPPRODUCTICON" Value="AppIcon.ico" /> | ||
<WixVariable Id="WixUILicenseRtf" Value="win32-LICENSE.rtf" /> | ||
<WixVariable Id="WixUIBannerBmp" Value="ocbanner.png" /> | ||
<WixVariable Id="WixUIDialogBmp" Value="ocdialog.png" /> | ||
</Product> | ||
</Wix> |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.