Skip to content

Commit

Permalink
temp gen readme (paritytech#470)
Browse files Browse the repository at this point in the history
  • Loading branch information
nuke-web3 authored Sep 15, 2021
1 parent 62a0a61 commit 43f66cf
Showing 1 changed file with 24 additions and 18 deletions.
42 changes: 24 additions & 18 deletions docs/node-template-release.md
Original file line number Diff line number Diff line change
@@ -1,26 +1,32 @@
# Substrate Node Template Release Process
# Frontier Node Template Release Process

> NOTE: this is a
> [copy from Subtrate](https://github.com/paritytech/substrate/blob/master/docs/node-template-release.md) -
> there is NO frontier template on the devhub at present. This file only serves as a reference.
> NOTE: this based on the
> [Subtrate node template release process](https://github.com/paritytech/substrate/blob/master/docs/node-template-release.md) -
1. This release process has to be run in a github checkout Substrate directory with your work
committed into `https://github.com/paritytech/substrate/`, because the build script will check
1. Clone and checkout the `main` branch of the
[Frontier Node Template](https://github.com/substrate-developer-hub/frontier-node-template/).
Note the path to this directory.

2. This release process has to be run in a github checkout Frontier directory with your work
committed into `https://github.com/paritytech/frontier/`, because the build script will check
the existence of your current git commit ID in the remote repository.

Assume you are in root directory of Substrate. Run:
Assume you are in the root directory of Frontier. Run:

```bash
cd .maintain/
./node-template-release.sh <output tar.gz file>
./node-template-release.sh TEMPLATE.tar.gz
```

2. Expand the output tar gzipped file and replace files in current Substrate Node Template by
running the following command.
3. Expand the output tar gzipped file that is created in the top level working dir of Frontier and
replace files in current Frontier Node Template by running the following command:

```bash
# Note the file will be placed in the top level working dir of Frontier
# Move the archive to wherever you like...
tar xvzf TEMPLATE.tar.gz
# This is where the tar.gz file uncompressed
cd substrate-node-template
cd frontier-node-template
# rsync with force copying. Note the slash at the destination directory is important
rsync -avh * <destination node-template directory>/
# For dry-running add `-n` argument
Expand All @@ -31,10 +37,10 @@
delete files/directories that are removed from the source. So you need to manually check and
remove them in the destination.

3. There are actually three packages in the Node Template, `node-template` (the node),
`node-template-runtime` (the runtime), and `pallet-template`, and each has its own `Cargo.toml`.
Inside these three files, dependencies are listed in expanded form and linked to a certain git
commit in Substrate remote repository, such as:
4. There are actually two packages in the Node Template, `frontier-node-template` (the node),
`frontier-template-runtime` (the runtime); Each has its' own `Cargo.toml`. Inside these three
files, dependencies are listed in expanded form and linked to a certain git commit in Frontier
remote repository, such as:

```toml
[dev-dependencies.sp-core]
Expand All @@ -56,16 +62,16 @@
P.S: This step can be automated if we update `node-template-release` package in
`.maintain/node-template-release`.

4. Once the three `Cargo.toml`s are updated, compile and confirm that the Node Template builds.
5. Once the three `Cargo.toml`s are updated, compile and confirm that the Node Template builds.
Then commit the changes to a new branch in
[Substrate Node Template](https://github.com/substrate-developer-hub/substrate-node-template),
[Substrate Node Template](https://github.com/substrate-developer-hub/frontier-node-template),
and make a PR.

> Note that there is a chance the code in Substrate Node Template works with the linked Substrate git
commit but not with published packages due to the latest (as yet) unpublished features. In this case,
rollback that section of the Node Template to its previous version to ensure the Node Template builds.

5. Once the PR is merged, tag the merged commit in master branch with the version number `vX.Y.Z+A`
6. Once the PR is merged, tag the merged commit in master branch with the version number `vX.Y.Z+A`
(e.g. `v3.0.0+1`). The `X`(major), `Y`(minor), and `Z`(patch) version number should follow
Substrate release version. The last digit is any significant fixes made in the Substrate Node
Template apart from Substrate. When the Substrate version is updated, this digit is reset to 0.
Expand Down

0 comments on commit 43f66cf

Please sign in to comment.