Run webui e2e test in prod mode (#157)

This commit is contained in:
饺子w 2019-03-16 02:24:24 +08:00 committed by Jannis Mattheis
parent 178c76f410
commit 79b3a0c3da
2 changed files with 4 additions and 2 deletions

View File

@ -25,7 +25,7 @@ format:
goimports -w $(shell find . -type f -name '*.go' -not -path "./vendor/*")
test-js:
go build -ldflags="-s -w" -o removeme/gotify app.go
go build -ldflags="-s -w -X main.Mode=prod" -o removeme/gotify app.go
(cd ui && CI=true GOTIFY_EXE=../removeme/gotify npm test)
rm -rf removeme

View File

@ -120,7 +120,9 @@ const buildGoExecutable = (filename: string): Promise<void> => {
} else {
process.stdout.write(`### Building Gotify ${filename}\n`);
return new Promise((resolve) =>
exec(`go build -o ${filename} ${appDotGo}`, () => resolve())
exec(`go build -ldflags="-X main.Mode=prod" -o ${filename} ${appDotGo}`, () =>
resolve()
)
);
}
};