Navigator: Remove unused Makefile targets

... and fix the "start-frontend" target
This commit is contained in:
Robert Autenrieth 2019-04-05 00:02:04 +02:00 committed by Robert Autenrieth
parent b98fe6312f
commit fcc8a43394
6 changed files with 11 additions and 52 deletions

View File

@ -1,29 +1,12 @@
.PHONY: clean build publish bundle-frontend test
.PHONY: build test start-frontend start-ui-core
default: build
clean:
rm -rf dist
build: clean bundle-frontend
$(MAKE) -C backend build
mkdir -p dist
mv backend/target/navigator-*.jar dist/
$(MAKE) -C integration-test build
publish: bundle-frontend
$(MAKE) -C backend publish
$(MAKE) -C integration-test publish
bundle-frontend:
$(MAKE) -C frontend build
rm -rf backend/src/main/resources/frontend
mv frontend/dist backend/src/main/resources/frontend
build:
bazel build //navigator/...
test:
$(MAKE) -C backend test
$(MAKE) -C frontend test
$(MAKE) -C integration-test test
bazel test //navigator/...
start-backend:
$(MAKE) -C backend start

View File

@ -1,37 +1,12 @@
.PHONY: clean build publish test start
.PHONY: publish-backend publish-docs navigator-docs
version:=$(shell awk -F\" '/^[ \t]*version/ { print $$2 }' < build.sbt)
.PHONY: build test start
default: build
clean:
sbt -no-colors clean
build:
sbt -no-colors assembly
publish: publish-backend publish-docs
publish-backend:
sbt -no-colors publish
# To publish documentation, you will need Bintray credentials
# with publish rights (ask Jussi) and the JFrog configurations.
# Run 'jfrog bt config' to set it up. Jenkins has the JFrog config
# available via the 'withJFrogCredentials' helper.
publish-docs: navigator-docs
jfrog bt upload --publish=true --flat=false \
navigator-docs-${version}.tar.gz \
digitalassetsdk/DigitalAssetSDK/navigator/${version} \
com/digitalasset/navigator/navigator-docs/${version}/navigator-docs-${version}.tar.gz
rm -f navigator-docs-${version}.tar.gz
bazel build //navigator/backend/...
test:
sbt -no-colors test
start:
sbt -no-colors "run server"
bazel test //navigator/backend/...
report-licenses:
sbt dumpLicenseReport

View File

@ -96,6 +96,7 @@ genrule(
# -d --progress --display-error-details --verbose
$(execpath :webpack) \
--config="$$IN/webpack.config.js" \
--env.prod \
--env.bazel_in_dir="$$IN" \
--env.bazel_out_dir="$$OUT/frontend"

View File

@ -1,4 +1,4 @@
.PHONY: setup build start clean setup upgrade-local-ui-core report-licenses
.PHONY: setup build start clean setup update-graphql-types report-licenses
default: build

View File

@ -15,7 +15,7 @@
"scripts": {
"start": "webpack-dev-server",
"start-ui-core": "webpack-dev-server --config webpack.ui-core.js",
"build": "webpack --env=production",
"build": "webpack --env.prod",
"test": "echo 'No frontend tests exist yet.'",
"lint": "tslint --project tslint.json"
},

View File

@ -55,7 +55,7 @@ module.exports = (env) => {
const out_dir = env && env.bazel_out_dir || path.join(__dirname, 'dist');
const build_version = env && env.bazel_version_file ? fs.readFileSync(env.bazel_version_file, 'utf8').trim() : 'HEAD';
const build_commit = env && env.bazel_commit_file ? fs.readFileSync(env.bazel_commit_file, 'utf8').trim() : 'HEAD';
const isProduction = env && env.prod || true
const isProduction = env ? (!!env.prod || !!env.production) : false;
console.log(isProduction ? 'PRODUCTION' : 'DEVELOPMENT');
const modernizr_config = path.join(in_dir, '.modernizrrc');