From 55b41105ba1179dc5417cc150431981de27fb443 Mon Sep 17 00:00:00 2001 From: Evelyn Gurschler Date: Tue, 28 Nov 2023 16:38:01 +0100 Subject: [PATCH] chore(trg-7.05): add legal info at build (#391) https://github.com/eclipse-tractusx/portal-frontend/issues/382 --- .dockerignore | 1 - .gitignore | 9 ++++++++- package.json | 5 +++-- 3 files changed, 11 insertions(+), 4 deletions(-) diff --git a/.dockerignore b/.dockerignore index 28621a5e4..edcfd6c81 100644 --- a/.dockerignore +++ b/.dockerignore @@ -3,5 +3,4 @@ .github .gitignore .husky -LICENSE **/node_modules diff --git a/.gitignore b/.gitignore index 836d2ad8a..277202819 100644 --- a/.gitignore +++ b/.gitignore @@ -8,4 +8,11 @@ storybook *.tgz *.tar.gz *.ignore -.DS_Store \ No newline at end of file +.DS_Store + +# Add legal info files during build + +public/LICENSE +public/DEPENDENCIES +public/NOTICE.md +public/SECURITY.md \ No newline at end of file diff --git a/package.json b/package.json index 8084af95f..9a02ff2af 100644 --- a/package.json +++ b/package.json @@ -100,7 +100,7 @@ "pretty": "prettier --write \"**/*.{ts,tsx,js,jsx,json,css,sass,scss,xml,md}\"", "lint": "yarn run eslint \"./src/**/*.{ts,tsx}\"", "start": "PORT=3001 BROWSER=none GENERATE_SOURCEMAP=false react-scripts start", - "build": "GENERATE_SOURCEMAP=false react-scripts build", + "build": "yarn build:copy-legal-info && GENERATE_SOURCEMAP=false react-scripts build", "test": "react-scripts test", "test:ci": "CI=true react-scripts test", "build:docker": "if [ -d \"./build\" ]; then yarn build:docker:prebuilt; else yarn build:docker:full; fi", @@ -108,6 +108,7 @@ "build:docker:prebuilt": "IMAGE=$npm_package_config_image && docker build -t $IMAGE -f .conf/Dockerfile.prebuilt . && docker tag $IMAGE:latest $IMAGE:$npm_package_version", "start:docker": "IMAGE=$npm_package_config_image && docker run --rm -d -p 3001:8080 --name cx-portal $IMAGE", "publish:docker": "IMAGE=$npm_package_config_image && docker tag $IMAGE:latest $IMAGE:$npm_package_version && docker push $IMAGE:$npm_package_version && docker push $IMAGE:latest", - "build:legal-notice": "bash scripts/legal-notice.sh" + "build:legal-notice": "bash scripts/legal-notice.sh", + "build:copy-legal-info": "cp LICENSE NOTICE.md DEPENDENCIES SECURITY.md public/" } }