Fixes checked in web assets and associated build scripts. (#3173)

pull/3142/merge
James Phillips 2017-06-21 14:43:07 -07:00 committed by GitHub
parent 50e11db5d8
commit 0e695aef94
3 changed files with 320 additions and 1229 deletions

View File

@ -73,15 +73,17 @@ vet:
exit 1; \ exit 1; \
fi fi
# build the static web ui and build static assets inside a Docker container, the # Build the static web ui and build static assets inside a Docker container, the
# same way a release build works # same way a release build works. This implicitly does a "make static-assets" at
# the end.
ui: ui:
@sh -c "'$(CURDIR)/scripts/ui.sh'" @sh -c "'$(CURDIR)/scripts/ui.sh'"
# generates the static web ui that's compiled into the binary # If you've run "make ui" manually then this will get called for you. This is
# also run as part of the release build script when it verifies that there are no
# changes to the UI assets that aren't checked in.
static-assets: static-assets:
@echo "--> Generating static assets" @go-bindata-assetfs -pkg agent -prefix pkg ./pkg/web_ui/...
@go-bindata-assetfs -pkg agent -prefix pkg ui/...
@mv bindata_assetfs.go agent/ @mv bindata_assetfs.go agent/
$(MAKE) format $(MAKE) format

File diff suppressed because one or more lines are too long

View File

@ -22,13 +22,13 @@ popd
# verify that the checked-in content is up to date without spurious diffs of the # verify that the checked-in content is up to date without spurious diffs of the
# file mod times. # file mod times.
pushd pkg pushd pkg
cat ../command/agent/bindata_assetfs.go | ../scripts/fixup_times.sh cat ../agent/bindata_assetfs.go | ../scripts/fixup_times.sh
popd popd
# Regenerate the built-in web assets. If there are any diffs after doing this # Regenerate the built-in web assets. If there are any diffs after doing this
# then we know something is up. # then we know something is up.
make static-assets make static-assets
if ! git diff --quiet command/agent/bindata_assetfs.go; then if ! git diff --quiet agent/bindata_assetfs.go; then
echo "Checked-in web assets are out of date, build aborted" echo "Checked-in web assets are out of date, build aborted"
exit 1 exit 1
fi fi