Skip to content

Commit

Permalink
Replace UUID package, resolves upstream issue.
Browse files Browse the repository at this point in the history
Resolves mh-cbon#31
  • Loading branch information
Max committed Mar 20, 2019
1 parent 23f9c55 commit 3ca34d8
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 15 deletions.
26 changes: 18 additions & 8 deletions glide.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions glide.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@ import:
version: ^1.1.1
- package: github.com/mh-cbon/stringexec
version: ~0.0.1
- package: github.com/satori/go.uuid
version: ^1.1.0
- package: github.com/google/uuid
version: ^1.1.1
10 changes: 5 additions & 5 deletions manifest/index.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (
"strings"

"github.com/Masterminds/semver"
"github.com/satori/go.uuid"
"github.com/google/uuid"
)

// WixManifest is the struct to decode a wix.json file.
Expand Down Expand Up @@ -149,19 +149,19 @@ func (wixFile *WixManifest) Load(p string) error {
func (wixFile *WixManifest) SetGuids(force bool) (bool, error) {
updated := false
if wixFile.UpgradeCode == "" || force {
wixFile.UpgradeCode = uuid.NewV4().String()
wixFile.UpgradeCode = uuid.Must(uuid.NewRandom()).String()
updated = true
}
if wixFile.Files.GUID == "" || force {
wixFile.Files.GUID = uuid.NewV4().String()
wixFile.Files.GUID = uuid.Must(uuid.NewRandom()).String()
updated = true
}
if (wixFile.Env.GUID == "" || force) && len(wixFile.Env.Vars) > 0 {
wixFile.Env.GUID = uuid.NewV4().String()
wixFile.Env.GUID = uuid.Must(uuid.NewRandom()).String()
updated = true
}
if (wixFile.Shortcuts.GUID == "" || force) && len(wixFile.Shortcuts.Items) > 0 {
wixFile.Shortcuts.GUID = uuid.NewV4().String()
wixFile.Shortcuts.GUID = uuid.Must(uuid.NewRandom()).String()
updated = true
}
return updated, nil
Expand Down

0 comments on commit 3ca34d8

Please sign in to comment.