This repository has been archived by the owner on Feb 16, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 21
Add script to generate Windows installers (.msi) #58
Closed
Closed
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 |
---|---|---|
|
@@ -26,3 +26,6 @@ build: | |
|
||
install: | ||
go install ${BUILD_FLAGS} ./cmd/secrethub | ||
|
||
msi: | ||
./msi.sh |
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,11 @@ | ||
NAME="SecretHub CLI" | ||
EXE=bin/secrethub.exe | ||
VERSION=$(git describe --tags $(git rev-list --tags --max-count=1)) | ||
MANUFACTURER=SecretHub | ||
UPGRADE_CODE=7178CB18-B431-4A9D-B29E-D31E63A1CF77 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is this a static value? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes this is an arbitrary GUID to identify our app, so Windows knows it's same app across potential name changes. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ah ok, got it 👍 Consider adding a comment as this is some weird arcane MSI knowledge. |
||
ICON="/dist/secrethub.png" | ||
|
||
curl -s -o dist/secrethub.png https://secrethub.io/img/secrethub-logo-rgb-shield-square.png | ||
mkdir -p dist/msi | ||
docker run -v $(pwd)/dist:/dist msi-packager /dist/windows_amd64 /dist/msi/secrethub_windows_amd64.msi -n $NAME -e $EXE -v $VERSION -m $MANUFACTURER -u $UPGRADE_CODE -i $ICON --local | ||
docker run -v $(pwd)/dist:/dist msi-packager /dist/windows_386 /dist/msi/secrethub_windows_386.msi -n $NAME -e $EXE -v $VERSION -m $MANUFACTURER -u $UPGRADE_CODE -i $ICON --local | ||
florisvdg marked this conversation as resolved.
Show resolved
Hide resolved
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Consider adding the
make msi
command to the goreleaser config as a pre or post build hook (not sure which would be preferred here, I think post). Then we can include the resulting.msi
files in the release.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.
I tried that at first, but those hooks very limited. Can have another look later.