Skip to content

Commit 99ddd24

Browse files
committed
Merge remote-tracking branch 'origin/develop' into fix/server_error_messages
2 parents a1a1340 + 233d825 commit 99ddd24

File tree

2 files changed

+10
-6
lines changed

2 files changed

+10
-6
lines changed

Makefile

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@ VALIDATOR_BINARY := validator
1313
SIGNER_BINARY := signer
1414

1515
# allow custom program name
16-
LAUNCHER_PROGRAM_NAME := $(shell GO111MODULE=on go run cmd/echo_field/main.go cmd/launcher/resources/launcher-config.json BinaryName)
16+
LAUNCHER_PROGRAM_NAME := $(shell go run cmd/echo_field/main.go cmd/launcher/resources/launcher-config.json BinaryName)
1717
LAUNCHER_PROGRAM_EXT :=
18-
LAUNCHER_BRANDING_NAME := $(shell GO111MODULE=on go run cmd/echo_field/main.go cmd/launcher/resources/launcher-config.json BrandingName)
18+
LAUNCHER_BRANDING_NAME := $(shell go run cmd/echo_field/main.go cmd/launcher/resources/launcher-config.json BrandingName)
1919
MSI_PREFIX := ${LAUNCHER_PROGRAM_NAME}
2020

2121
GITDESC := $(shell git describe --tags 2> /dev/null || echo unavailable)
@@ -57,7 +57,6 @@ endif
5757
$(info Detected uname-id '${OS_UNAME}' as OS '${OS}')
5858

5959
# Globally enable go modules
60-
export GO111MODULE=on
6160
export GOOS=${OS}
6261
export LAUNCHER_PROGRAM_NAME
6362
export LAUNCHER_PROGRAM_EXT
@@ -213,7 +212,7 @@ copy-test-files: ## Copy example resources into resource directory
213212
cp examples/defaulticon.ico cmd/launcher/resources/icon.ico
214213

215214
generate: ## Run go generate
216-
GO111MODULE=off go get github.com/josephspurrier/goversioninfo/cmd/goversioninfo
215+
go get github.com/josephspurrier/goversioninfo/cmd/goversioninfo
217216
go generate -installsuffix _separate -ldflags '${LDFLAGS}' ${MODULE_PATH_LAUNCHER}
218217

219218
clean: ## Clean generated files

pkg/launcher/timestamps/timestamps.go

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,10 @@ type Timestamps struct {
1818
Bundles map[string]string `json:"Bundles"`
1919
}
2020

21+
func createEmptyTimestamps() *Timestamps {
22+
return &Timestamps{DeploymentConfig: "", Bundles: map[string]string{}}
23+
}
24+
2125
func VerifyDeploymentConfigTimestamp(newTimestamp, filePath string) {
2226
timestamps := readTimestamps(filePath)
2327
timestamps.CheckAndSetDeploymentConfigTimestamp(newTimestamp)
@@ -36,7 +40,7 @@ func readTimestamps(filePath string) *Timestamps {
3640
if os.IsNotExist(err) {
3741
log.WithFields(log.Fields{"err": err, "filePath": filePath}).Infof("Could not read timestamps " +
3842
"because the file does not yet exist: looks like this is the first run of the launcher.")
39-
return &Timestamps{DeploymentConfig: "", Bundles: map[string]string{}}
43+
return createEmptyTimestamps()
4044
}
4145
panic(err)
4246
}
@@ -64,7 +68,8 @@ func ReadTimestampsFromReader(reader io.Reader) *Timestamps {
6468
var timestamps Timestamps
6569
err = json.Unmarshal(bytes, &timestamps)
6670
if err != nil {
67-
panic(fmt.Sprintf("Could not unmarshal timestamps `%s`: %v", string(bytes), err))
71+
log.Warnf("Ignoring timestamps: Could not unmarshal timestamps `%s`: %v", string(bytes), err)
72+
return createEmptyTimestamps()
6873
}
6974
return &timestamps
7075
}

0 commit comments

Comments
 (0)