Skip to content

Commit

Permalink
Feat: refactor release script
Browse files Browse the repository at this point in the history
  • Loading branch information
mbarbet committed Jan 28, 2025
1 parent 54738e8 commit 1e2f76f
Show file tree
Hide file tree
Showing 16 changed files with 75 additions and 387 deletions.
23 changes: 3 additions & 20 deletions angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,7 @@
}
}
},
"arlas-wui-opensource-lib": {
"arlas-wui-lib": {
"projectType": "library",
"root": "",
"sourceRoot": "src",
Expand All @@ -318,25 +318,8 @@
"defaultConfiguration": "production-opensource",
"configurations": {
"production-opensource": {
"tsConfig": "tsconfig.lib.prod.opensource.json",
"project": "ng-package.opensource.json"
}
}
}
}
},
"arlas-wui-cloud-lib": {
"projectType": "library",
"root": "",
"sourceRoot": "src",
"architect": {
"build": {
"builder": "@angular-devkit/build-angular:ng-packagr",
"defaultConfiguration": "production-cloud",
"configurations": {
"production-cloud": {
"tsConfig": "tsconfig.lib.prod.cloud.json",
"project": "ng-package.cloud.json"
"tsConfig": "tsconfig.lib.prod.json",
"project": "ng-package.json"
}
}
}
Expand Down
23 changes: 9 additions & 14 deletions docker/Dockerfile-production-cloud → docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,24 +1,19 @@

### STAGE 1: Build ###

# We label our stage as 'builder'
FROM node:18.20.5 AS builder
ARG WORKSPACE

COPY ./packages/cloud/package-docker.json ./package.json

RUN npm set progress=false && npm config set depth 0 && npm cache clean --force

## Storing node modules on a separate layer will prevent unnecessary npm installs at each build
RUN npm i && mkdir /ng-app && cp -R ./node_modules ./ng-app

COPY ./scripts/start.sh ./ng-app
COPY ./scripts/fetch-conf-by-http.sh ./ng-app

RUN mkdir /ng-app
WORKDIR /ng-app

COPY . .

## Build the angular app in production mode and store the artifacts in <dist folder>
RUN npm run build-cloud
RUN rm -rf node_modules
RUN npm install --workspace=packages/$WORKSPACE --include-workspace-root=true
COPY ./scripts/start.sh .
COPY ./scripts/fetch-conf-by-http.sh .
## Build the angular app in production mode and store the artifacts in dist folder
RUN npm run build-$WORKSPACE

### STAGE 2: Setup ###

Expand Down
Empty file.
47 changes: 0 additions & 47 deletions docker/Dockerfile-production-opensource

This file was deleted.

15 changes: 0 additions & 15 deletions ng-package.cloud.json

This file was deleted.

2 changes: 1 addition & 1 deletion ng-package.opensource.json → ng-package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@
"."
],
"lib": {
"entryFile": "src/public-api.opensource.ts"
"entryFile": "src/public-api.ts"
}
}
57 changes: 14 additions & 43 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 6 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
{
"name": "arlas-wui",
"workspaces": [
"packages/cloud",
"packages/opensource"
],
"version": "27.1.0-dev",
"author": "gisaia",
"license": "Apache-2.0",
Expand All @@ -10,10 +14,9 @@
"start": "ng serve",
"build-opensource-stats": "ng build arlas-wui --configuration production-opensource --aot --base-href='$ARLAS_WUI_BASE_HREF/' --stats-json --metafile=meta.json",
"build-opensource": "ng build arlas-wui --configuration production-opensource --aot --base-href='$ARLAS_WUI_BASE_HREF/'",
"build-opensource-lib": "ng build arlas-wui-opensource-lib",
"build-lib": "ng build arlas-wui-lib",
"analyze-opensource": "esbuild-visualizer --metadata dist/stats.json",
"build-cloud": "ng build arlas-wui --configuration production-cloud --aot --base-href='$ARLAS_WUI_BASE_HREF/'",
"build-cloud-lib": "ng build arlas-wui-cloud-lib",
"test": "ng test",
"lint": "ng lint",
"e2e": "ng e2e",
Expand Down Expand Up @@ -75,9 +78,5 @@
"ts-node": "~10.4.0",
"typescript": "5.5.4",
"webpack-bundle-analyzer": "^4.10.2"
},
"workspaces": [
"packages/cloud",
"packages/opensource"
]
}
}
Loading

0 comments on commit 1e2f76f

Please sign in to comment.