mirror of
https://github.com/optim-enterprises-bv/vault.git
synced 2025-11-02 19:47:54 +00:00
Add UI asset file checks to Makefile (#6428)
This commit is contained in:
10
Makefile
10
Makefile
@@ -31,7 +31,7 @@ bin: prep
|
|||||||
# into ./bin/ as well as $GOPATH/bin
|
# into ./bin/ as well as $GOPATH/bin
|
||||||
dev: prep
|
dev: prep
|
||||||
@CGO_ENABLED=$(CGO_ENABLED) BUILD_TAGS='$(BUILD_TAGS)' VAULT_DEV_BUILD=1 sh -c "'$(CURDIR)/scripts/build.sh'"
|
@CGO_ENABLED=$(CGO_ENABLED) BUILD_TAGS='$(BUILD_TAGS)' VAULT_DEV_BUILD=1 sh -c "'$(CURDIR)/scripts/build.sh'"
|
||||||
dev-ui: prep
|
dev-ui: assetcheck prep
|
||||||
@CGO_ENABLED=$(CGO_ENABLED) BUILD_TAGS='$(BUILD_TAGS) ui' VAULT_DEV_BUILD=1 sh -c "'$(CURDIR)/scripts/build.sh'"
|
@CGO_ENABLED=$(CGO_ENABLED) BUILD_TAGS='$(BUILD_TAGS) ui' VAULT_DEV_BUILD=1 sh -c "'$(CURDIR)/scripts/build.sh'"
|
||||||
dev-dynamic: prep
|
dev-dynamic: prep
|
||||||
@CGO_ENABLED=1 BUILD_TAGS='$(BUILD_TAGS)' VAULT_DEV_BUILD=1 sh -c "'$(CURDIR)/scripts/build.sh'"
|
@CGO_ENABLED=1 BUILD_TAGS='$(BUILD_TAGS)' VAULT_DEV_BUILD=1 sh -c "'$(CURDIR)/scripts/build.sh'"
|
||||||
@@ -42,7 +42,7 @@ dev-dynamic: prep
|
|||||||
dev-mem: BUILD_TAGS+=memprofiler
|
dev-mem: BUILD_TAGS+=memprofiler
|
||||||
dev-mem: dev
|
dev-mem: dev
|
||||||
dev-ui-mem: BUILD_TAGS+=memprofiler
|
dev-ui-mem: BUILD_TAGS+=memprofiler
|
||||||
dev-ui-mem: dev-ui
|
dev-ui-mem: assetcheck dev-ui
|
||||||
dev-dynamic-mem: BUILD_TAGS+=memprofiler
|
dev-dynamic-mem: BUILD_TAGS+=memprofiler
|
||||||
dev-dynamic-mem: dev-dynamic
|
dev-dynamic-mem: dev-dynamic
|
||||||
|
|
||||||
@@ -166,6 +166,10 @@ fmtcheck:
|
|||||||
fmt:
|
fmt:
|
||||||
gofmt -w $(GOFMT_FILES)
|
gofmt -w $(GOFMT_FILES)
|
||||||
|
|
||||||
|
assetcheck:
|
||||||
|
@echo "==> Checking compiled UI assets..."
|
||||||
|
@sh -c "'$(CURDIR)/scripts/assetcheck.sh'"
|
||||||
|
|
||||||
spellcheck:
|
spellcheck:
|
||||||
@echo "==> Spell checking website..."
|
@echo "==> Spell checking website..."
|
||||||
@misspell -error -source=text website/source
|
@misspell -error -source=text website/source
|
||||||
@@ -194,6 +198,6 @@ hana-database-plugin:
|
|||||||
mongodb-database-plugin:
|
mongodb-database-plugin:
|
||||||
@CGO_ENABLED=0 go build -o bin/mongodb-database-plugin ./plugins/database/mongodb/mongodb-database-plugin
|
@CGO_ENABLED=0 go build -o bin/mongodb-database-plugin ./plugins/database/mongodb/mongodb-database-plugin
|
||||||
|
|
||||||
.PHONY: bin default prep test vet bootstrap fmt fmtcheck mysql-database-plugin mysql-legacy-database-plugin cassandra-database-plugin influxdb-database-plugin postgresql-database-plugin mssql-database-plugin hana-database-plugin mongodb-database-plugin static-assets ember-dist ember-dist-dev static-dist static-dist-dev
|
.PHONY: bin default prep test vet bootstrap fmt fmtcheck mysql-database-plugin mysql-legacy-database-plugin cassandra-database-plugin influxdb-database-plugin postgresql-database-plugin mssql-database-plugin hana-database-plugin mongodb-database-plugin static-assets ember-dist ember-dist-dev static-dist static-dist-dev assetcheck
|
||||||
|
|
||||||
.NOTPARALLEL: ember-dist ember-dist-dev static-assets
|
.NOTPARALLEL: ember-dist ember-dist-dev static-assets
|
||||||
|
|||||||
11
scripts/assetcheck.sh
Executable file
11
scripts/assetcheck.sh
Executable file
@@ -0,0 +1,11 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
if [[ ! -e http/bindata_assetfs.go ]]
|
||||||
|
then
|
||||||
|
printf "Compiled UI assets not found. They can be built with: make static-dist\n\n"
|
||||||
|
else
|
||||||
|
if [[ `find http/bindata_assetfs.go -mmin +10080` ]]
|
||||||
|
then
|
||||||
|
printf "Compiled UI assets are more than one week old. They can be rebuilt with: make static-dist\n\n"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
Reference in New Issue
Block a user