Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clean URLs on proposal comment links and scroll proposal comment links into view #868

Merged
merged 9 commits into from
Jul 11, 2024
Prev Previous commit
Next Next commit
building of preview env script,
updated docs on building preview environments
petersalomonsen committed Jul 11, 2024
commit 5126f5a649bcbfcdd1b7cb0ed2a26ffa92d9b169
11 changes: 10 additions & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -70,8 +70,17 @@ Feel free to specify a new placeholder if needed. The placeholder should have a

#### Deploying preview environments

Refer to [BOS-workspace deployment instructions](https://github.com/NEARBuilders/bos-workspace?tab=readme-ov-file#deployment) for deploying preview environments.
Creating a preview environment is often useful for reviewers to test the new features before deploying to production. Before we can deploy components, there are several replacements of global variables that needs to be made, which is handled by the BOS workspaces build command.

By running:

```bash
npm run bw:build:devhub
```

you will get a new folder `build/devhub.near` that contains a `src` folder with all the components ready for deployment. The replacements are made according to the settings in `instances/devhub.near/aliases.mainnet.json` so you should for example change `REPL_DEVHUB` to the account name you are using for your preview environment. Note that "BOS workspaces" has a built in connection to BOS CLI for deploying with one command, but since "BOS workspaces" will output to `src/widgets` instead of `src`, and that it requires the signing key as a command argument, we have chosen to split this process in two steps using `bw build ` for replacing and preparing the deployment folder, and using `bos components deploy` separately for the deployment.

From the `build/devhub.near` folder you can use `bos components deploy`.

#### Deploy for Production

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -16,7 +16,7 @@
"fmt:check": "prettier --check '**/*.{js,jsx,ts,tsx,json}'",
"build": "npm run fmt",
"bw:dev:devhub": "bw dev instances/devhub.near",
"bw:build:devhub": "bw build instances/devhub.near",
"bw:build:devhub": "bw build instances/devhub.near build/devhub.near && mv build/devhub.near/src/widget/* build/devhub.near/src/ && rm -Rf build/devhub.near/src/widget",
"gateway:devhub": "node scripts/dev-gateway.mjs devhub.near",
"bw:dev:infrastructure": "bw dev instances/infrastructure-committee.near",
"bw:build:infrastructure": "bw build instances/infrastructure-committee.near",