Update build commands (#1180)

This commit is contained in:
Oscar Hinton 2021-09-14 13:26:26 +02:00 committed by GitHub
parent c82d1b3c50
commit 30d2aeb6a3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 24 additions and 30 deletions

View File

@ -107,7 +107,7 @@ jobs:
echo -e "# Building Web\n" echo -e "# Building Web\n"
echo "Building app" echo "Building app"
echo "npm version $(npm --version)" echo "npm version $(npm --version)"
npm run dist:selfhost npm run dist:bit:selfhost
echo -e "\nBuilding Docker image" echo -e "\nBuilding Docker image"
docker --version docker --version
@ -200,7 +200,7 @@ jobs:
jq --arg version "$VERSION - ${GITHUB_SHA:0:7}" '.version = $version' package.json > package.json.tmp jq --arg version "$VERSION - ${GITHUB_SHA:0:7}" '.version = $version' package.json > package.json.tmp
mv package.json.tmp package.json mv package.json.tmp package.json
npm run build:qa npm run build:bit:qa
echo "{\"commit_hash\": \"$GITHUB_SHA\", \"ref\": \"$GITHUB_REF\"}" | jq . > build/info.json echo "{\"commit_hash\": \"$GITHUB_SHA\", \"ref\": \"$GITHUB_REF\"}" | jq . > build/info.json
@ -285,4 +285,4 @@ jobs:
run: npm install run: npm install
- name: NPM build - name: NPM build
run: npm run build:cloud run: npm run build:bit:cloud

View File

@ -52,7 +52,7 @@ jobs:
run: | run: |
npm run sub:init npm run sub:init
npm ci npm ci
npm run dist npm run dist:bit:cloud
- name: Deploy GitHub Pages - name: Deploy GitHub Pages
uses: crazy-max/ghaction-github-pages@db4476a01402e1a7ce05f41832040eef16d14925 # v2.5.0 uses: crazy-max/ghaction-github-pages@db4476a01402e1a7ce05f41832040eef16d14925 # v2.5.0

View File

@ -132,7 +132,7 @@ jobs:
echo "Building app" echo "Building app"
echo "npm version $(npm --version)" echo "npm version $(npm --version)"
npm install npm install
npm run dist:selfhost npm run dist:bit:selfhost
echo -e "\nBuilding Docker image" echo -e "\nBuilding Docker image"
docker --version docker --version

View File

@ -32,7 +32,7 @@ For local development, run the app with:
``` ```
npm install npm install
npm run build:watch npm run build:oss:watch
``` ```
You can now access the web vault in your browser at `https://localhost:8080`. You can now access the web vault in your browser at `https://localhost:8080`.
@ -41,7 +41,7 @@ If you want to point the development web vault to the production APIs, you can r
``` ```
npm install npm install
ENV=production npm run build:watch ENV=production npm run build:oss:watch
``` ```
You can also manually adjusting your API endpoint settings by adding `config/local.json` overriding any of the following values: You can also manually adjusting your API endpoint settings by adding `config/local.json` overriding any of the following values:
@ -60,11 +60,7 @@ You can also manually adjusting your API endpoint settings by adding `config/loc
} }
``` ```
Where the `urls` object is defined by the [Urls type in jslib](https://github.com/bitwarden/jslib/blob/master/common/src/abstractions/environment.service.ts). To pick up the overrides in the newly created `config/local.json` file, run the app with: Where the `urls` object is defined by the [Urls type in jslib](https://github.com/bitwarden/jslib/blob/master/common/src/abstractions/environment.service.ts).
```
npm run build:dev:watch
```
## Contribute ## Contribute

View File

@ -11,26 +11,24 @@
"symlink:win": "rm -rf ./jslib && cmd /c mklink /J .\\jslib ..\\jslib", "symlink:win": "rm -rf ./jslib && cmd /c mklink /J .\\jslib ..\\jslib",
"symlink:mac": "npm run symlink:lin", "symlink:mac": "npm run symlink:lin",
"symlink:lin": "rm -rf ./jslib && ln -s ../jslib ./jslib", "symlink:lin": "rm -rf ./jslib && ln -s ../jslib ./jslib",
"build": "gulp prebuild && webpack -c bitwarden_license/webpack.config.js",
"build:oss": "gulp prebuild && webpack", "build:oss": "gulp prebuild && webpack",
"build:watch": "gulp prebuild && webpack serve -c bitwarden_license/webpack.config.js", "build:bit": "gulp prebuild && webpack -c bitwarden_license/webpack.config.js",
"build:watch:oss": "gulp prebuild && webpack serve", "build:oss:watch": "gulp prebuild && webpack serve",
"build:dev": "cross-env ENV=development npm run build", "build:bit:watch": "gulp prebuild && webpack serve -c bitwarden_license/webpack.config.js",
"build:dev:watch": "cross-env ENV=development npm run build:watch", "build:bit:dev": "cross-env ENV=development npm run build:bit",
"build:qa": "cross-env NODE_ENV=production ENV=qa npm run build", "build:bit:dev:watch": "cross-env ENV=development npm run build:bit:watch",
"build:cloud": "cross-env NODE_ENV=production ENV=cloud npm run build", "build:bit:qa": "cross-env NODE_ENV=production ENV=qa npm run build:bit",
"build:cloud:oss": "cross-env NODE_ENV=production ENV=cloud npm run build:oss", "build:bit:cloud": "cross-env NODE_ENV=production ENV=cloud npm run build:bit",
"build:selfhost": "cross-env ENV=selfhosted npm run build:watch", "build:oss:selfhost:watch": "cross-env ENV=selfhosted npm run build:oss:watch",
"build:selfhost:watch": "cross-env ENV=selfhosted npm run build:watch", "build:bit:selfhost:watch": "cross-env ENV=selfhosted npm run build:bit:watch",
"build:selfhost:prod": "cross-env ENV=selfhosted NODE_ENV=production npm run build", "build:oss:selfhost:prod": "cross-env ENV=selfhosted NODE_ENV=production npm run build:oss",
"build:selfhost:prod:oss": "cross-env ENV=selfhosted NODE_ENV=production npm run build:oss", "build:bit:selfhost:prod": "cross-env ENV=selfhosted NODE_ENV=production npm run build:bit",
"clean:l10n": "git push origin --delete l10n_master", "clean:l10n": "git push origin --delete l10n_master",
"dist": "npm run build:cloud && gulp postdist", "dist:bit:cloud": "npm run build:bit:cloud && gulp postdist",
"dist:oss": "npm run build:cloud:oss && gulp postdist", "dist:oss:selfhost": "npm run build:oss:selfhost:prod && gulp postdist",
"dist:selfhost": "npm run build:selfhost:prod && gulp postdist", "dist:bit:selfhost": "npm run build:bit:selfhost:prod && gulp postdist",
"dist:selfhost:oss": "npm run build:selfhost:prod:oss && gulp postdist", "deploy": "npm run dist:bit && gh-pages -d build",
"deploy": "npm run dist && gh-pages -d build", "deploy:dev": "npm run dist:bit && gh-pages -d build -r git@github.com:kspearrin/bitwarden-web-dev.git",
"deploy:dev": "npm run dist && gh-pages -d build -r git@github.com:kspearrin/bitwarden-web-dev.git",
"lint": "tslint 'src/**/*.ts' 'bitwarden_license/src/**/*.ts' || true", "lint": "tslint 'src/**/*.ts' 'bitwarden_license/src/**/*.ts' || true",
"lint:fix": "tslint 'src/**/*.ts' 'bitwarden_license/src/**/*.ts' --fix" "lint:fix": "tslint 'src/**/*.ts' 'bitwarden_license/src/**/*.ts' --fix"
}, },