Skip to content

Commit

Permalink
Updated doc
Browse files Browse the repository at this point in the history
  • Loading branch information
jcortejoso committed Aug 4, 2022
1 parent fc35569 commit c2588fe
Showing 1 changed file with 29 additions and 16 deletions.
45 changes: 29 additions & 16 deletions docs/ReleaseProcess.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,25 @@
---
sidebar_position: 4
---

# Release Process

## Build a new version

The steps to build a new version are the following:
We follow the standard Nevermined release pattern:

- Make sure the versions are up to date: `package.json`, `setup.py`, `pom.xml`
- Create a tag:

```bash
git tag v2.0.0
```

- Push the tag:

- Create a new local feature branch, e.g. `git checkout -b release/v0.2.5`
- Use the `bumpversion.sh` script to bump the project version. You can execute the script using {major|minor|patch} as first argument to bump the version accordingly:
- To bump the patch version: `./bumpversion.sh patch`
- To bump the minor version: `./bumpversion.sh minor`
- To bump the major version: `./bumpversion.sh major`
- assuming we are on version `v0.2.4` and the desired version is `v0.2.5` `./bumpversion.sh patch` has to be run.
```bash
git push origin v2.0.0
```

## Interact with networks

Expand Down Expand Up @@ -62,14 +72,14 @@ One instance of the multi sig wallet, defined as `owner`. This wallet will be as

### Deploy & Upgrade

Deployment configurations are on `hardhat.config.js`.

- run `yarn clean` to clean the work dir.
- run `yarn compile` to compile the contracts.

The following steps shows how to perform contracts deployment for new deployments (check `[Upgrades.md](./Upgrades.md)` for upgrading details)

#### Copy the files and artifacts
> :warning: The following steps shows how to perform contracts deployment for new deployments (check `[Upgrades.md](./Upgrades.md)` for upgrading details)
- Export the `NETWORK_ID` (check in https://chainlist.org/) and contract's tag `TAG`:
- Export the `NETWORK_ID` (check in [Chainlist](https://chainlist.org/)) and contract's tag `TAG`:

```bash
export NETWORK=mumbai
Expand All @@ -78,22 +88,25 @@ export TAG=common

- run `export MNEMONIC=<deployment's mnemonic>`. You will find them in the password manager.

##### Deploy and initialize the conracts
#### Deploy and initialize the conracts

- To deploy and initialize all contracts run `yarn deploy:$NETWORK`

This step will create `cache/` and `deploy-cache.json` used to resume the deployment in case something fails.

##### Upload the artifacts to the repository and persist any change in `openzeppelin/` file

- To upload the artifacts to the repository run `./scripts/upload_artifacts_s3.sh contracts $NETWORK $TAG`. You need to have access to S3.
> :warning: The following steps can override the S3 resources you are pushing to S3. Particularly, take care of not overriding the `openzeppelin/` file with some old version of the file.
- Copy the openzeppeling file adding the deployment's tag: `cp -rp .openzeppelin/unknown-$NETWORK_ID.json .openzeppelin/unknown-$NETWORK_ID.json.$TAG`
- To upload the artifacts to the repository run `./scripts/upload_artifacts_s3.sh contracts $NETWORK $TAG`. This will upload the contracts `tgz`/`zip` packages and the openzeppelin file. It will also rename `.openzeppelin/unknown-$NETWORK_ID.json` to `.openzeppelin/unknown-$NETWORK_ID.json.$TAG`. *You need to have access to artifacts-nevermined-rocks S3 bucket*.

- Commit all changes in `.openzeppelin/unknown-$NETWORK_ID.json.$TAG` file
- To upload the circuits to the repository run `./scripts/upload_artifacts_s3.sh circuits $NETWORK $TAG`. This will upload the contracts `tgz`/`zip` packages. *You need to have access to artifacts-nevermined-rocks S3 bucket*.

- Commit the changes in `.openzeppelin/unknown-$NETWORK_ID.json.$TAG` file

## Script for uploading the artifacts (abis/contracts) to Contract Repository

Once the contracts are deployed to a public network or a new contract version whose contract abis has to been uploaded, use `scripts/upload_artifacts_s3.sh` to upload
Once the contracts are deployed to a public network or a new con.tract version whose contract abis has to been uploaded, use `scripts/upload_artifacts_s3.sh` to upload
the contracts or artifacts to [nevermined repository](https://artifacts-nevermined-rocks.s3.amazonaws.com).

*Your environment has to be configured and authorized to use aws cli to upload files to `artifacts-nevermined-rocks` bucket.*.
Expand Down

0 comments on commit c2588fe

Please sign in to comment.