Skip to content

Commit

Permalink
[feat]: include chain-id as a second argument
Browse files Browse the repository at this point in the history
  • Loading branch information
Fraccaman committed Jan 25, 2022
1 parent 30f9ff0 commit 6eb83d5
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,17 +40,17 @@ Use it in the following commands.
To test run release:

```shell
./release.sh {archive_file_path} --draft
./release.sh {archive_file_path} {chain_id} --draft
```

To tag the master branch and upload the release archive created by `init-network` command, run:

```shell
./release.sh {archive_file_path}
./release.sh {archive_file_path} {chain_id}
```

For devnet use pre-release:

```shell
./release.sh {archive_file_path} --prerelease
./release.sh {archive_file_path} {chain_id} --prerelease
```
12 changes: 6 additions & 6 deletions release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
# Must have authenticated `gh` available (see https://github.com/cli/cli) with
# write access to https://github.com/heliaxdev/anoma-network-config.
#
# The first argument is the name of the archive file which must be present in
# the current working directory. The archive's name is expected to be equal to
# the chain ID with a "tar.gz" suffix.
# The first argument is the path to the archive file.
# The archive's name is expected to be equal to the chain ID with a "tar.gz" suffix.
# The second argument is the chain ID.
#
# IMPORTANT: Use pre-release for the devnet, add `--prerelease` flag at the end
# when calling this script.
Expand All @@ -19,8 +19,8 @@
set -e

ARCHIVE_FILE_PATH=$1
CHAIN_ID=${ARCHIVE_FILE_PATH%".tar.gz"}
EXTRA_ARG=$2
CHAIN_ID=$2
EXTRA_ARG="${@:3}"
echo "Chain ID: $CHAIN_ID"
CWD=$(pwd)
ARCHIVE="$CWD/$ARCHIVE_FILE_PATH"
Expand All @@ -32,7 +32,7 @@ if [ -n "$EXTRA_ARG" ] ; then
--title "$CHAIN_ID" \
--notes "Released network with chain ID: $CHAIN_ID" \
--repo heliaxdev/anoma-network-config \
"$EXTRA_ARG"
$EXTRA_ARG
else
gh release create "$CHAIN_ID" "$ARCHIVE" \
--title "$CHAIN_ID" \
Expand Down

0 comments on commit 6eb83d5

Please sign in to comment.