Jarek Kowalski
2022-07-06 20:54:11 -07:00
committed by GitHub
parent 0215e5651b
commit 9941a05ab1
4 changed files with 8 additions and 4 deletions

View File

@@ -125,6 +125,10 @@ kopia-ui-with-local-htmlui-changes:
rm -f $(kopia_ui_embedded_exe)
GOWORK=$(CURDIR)/tools/localhtmlui.work $(MAKE) kopia-ui
install-with-local-htmlui-changes:
(cd ../htmlui && npm run build && ./push_local.sh)
GOWORK=$(CURDIR)/tools/localhtmlui.work $(MAKE) install
# build-current-os-noui compiles a binary for the current os/arch in the same location as goreleaser
# kopia-ui build needs this particular location to embed the correct server binary.
# note we're not building or embedding HTML UI to speed up PR testing process.

2
go.mod
View File

@@ -83,7 +83,7 @@ require (
github.com/googleapis/gax-go/v2 v2.4.0 // indirect
github.com/jmespath/go-jmespath v0.4.0 // indirect
github.com/json-iterator/go v1.1.12 // indirect
github.com/kopia/htmluibuild v0.0.0-20220704183643-2abad2f87dcd
github.com/kopia/htmluibuild v0.0.0-20220707030846-0a2bb1459cbd
github.com/kr/fs v0.1.0 // indirect
github.com/mattn/go-ieproxy v0.0.1 // indirect
github.com/mattn/go-isatty v0.0.14 // indirect

4
go.sum
View File

@@ -343,8 +343,8 @@ github.com/klauspost/pgzip v1.2.5 h1:qnWYvvKqedOF2ulHpMG72XQol4ILEJ8k2wwRl/Km8oE
github.com/klauspost/pgzip v1.2.5/go.mod h1:Ch1tH69qFZu15pkjo5kYi6mth2Zzwzt50oCQKQE9RUs=
github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ=
github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ=
github.com/kopia/htmluibuild v0.0.0-20220704183643-2abad2f87dcd h1:JNf0I9XAT4cUA/+j4hLnvqkOSDc37kMqg2X0O6EuQdU=
github.com/kopia/htmluibuild v0.0.0-20220704183643-2abad2f87dcd/go.mod h1:eWer4rx9P8lJo2eKc+Q7AZ1dE1x1hJNdkbDFPzMu1Hw=
github.com/kopia/htmluibuild v0.0.0-20220707030846-0a2bb1459cbd h1:LRHDrSmhtQuO9gB7NM5nU6tfWHA4ZcuzlQHGsHAVKH8=
github.com/kopia/htmluibuild v0.0.0-20220707030846-0a2bb1459cbd/go.mod h1:eWer4rx9P8lJo2eKc+Q7AZ1dE1x1hJNdkbDFPzMu1Hw=
github.com/kr/fs v0.1.0 h1:Jskdu9ieNAYnjxsi0LbQp1ulIKZV1LAFgK1tWhpZgl8=
github.com/kr/fs v0.1.0/go.mod h1:FFnZGqtBN9Gxj7eW1uZ42v5BccTP0vu6NEaFoC2HwRg=
github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc=

View File

@@ -585,7 +585,7 @@ func verifyUIServedWithCorrectTitle(t *testing.T, cli *apiclient.KopiaAPIClient,
// make sure the UI correctly inserts prefix from KOPIA_UI_TITLE_PREFIX
// and it's correctly HTML-escaped.
if !bytes.Contains(b, []byte(`<title>Blah: &lt;script&gt;bleh&lt;/script&gt; Kopia UI`)) {
if !bytes.Contains(b, []byte(`<title>Blah: &lt;script&gt;bleh&lt;/script&gt; KopiaUI`)) {
t.Fatalf("invalid title served by the UI: %v.", string(b))
}
}