Skip to content

Commit

Permalink
Merge pull request #1134 from input-output-hk/fix-hydra-demo
Browse files Browse the repository at this point in the history
Fix hydra demo
  • Loading branch information
Arnaud Bailly authored Oct 20, 2023
2 parents 6dcd84d + 928bb71 commit e54fe5d
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 14 deletions.
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ During development
+ Make sure `CHANGELOG.md` is kept up-to-date with high-level, technical, but user-focused list of changes according to [keepachangelog](https://keepachangelog.com/en/1.0.0/)
+ Bump `UNRELEASED` version in `CHANGELOG.md` according to [semver](https://semver.org/)
+ Ensure `unstable` version of docker images is used in demo
- `sed -i -e "s,\(ghcr.io/input-output-hk/hydra-[^:]*\):[^[:space:]]*,\1:unstable," demo/*`
- `sed -i.bak -e "s,\(ghcr.io/input-output-hk/hydra-[^:]*\):[^[:space:]]*,\1:unstable," demo/*`
+ All `hydra-` packages are versioned the same, at latest on release their versions are aligned.
+ Other packages are versioned independently of `hydra-` packages and keep a dedicated changelog.

Expand Down
12 changes: 6 additions & 6 deletions demo/docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ services:

hydra-node-1:
# NOTE: Make sure to use the same image in ./seed-devnet.sh
image: ghcr.io/input-output-hk/hydra-node:0.14.0
image: ghcr.io/input-output-hk/hydra-node:unstable
build:
context: ../
target: hydra-node
Expand Down Expand Up @@ -60,7 +60,7 @@ services:

hydra-node-2:
# NOTE: Make sure to use the same image in ./seed-devnet.sh
image: ghcr.io/input-output-hk/hydra-node:0.14.0
image: ghcr.io/input-output-hk/hydra-node:unstable
build:
context: ../
target: hydra-node
Expand Down Expand Up @@ -97,7 +97,7 @@ services:

hydra-node-3:
# NOTE: Make sure to use the same image in ./seed-devnet.sh
image: ghcr.io/input-output-hk/hydra-node:0.14.0
image: ghcr.io/input-output-hk/hydra-node:unstable
build:
context: ../
target: hydra-node
Expand Down Expand Up @@ -133,7 +133,7 @@ services:
restart: always

hydra-tui-1:
image: ghcr.io/input-output-hk/hydra-tui:0.14.0
image: ghcr.io/input-output-hk/hydra-tui:unstable
build:
context: ../
target: hydra-tui
Expand All @@ -152,7 +152,7 @@ services:
ipv4_address: 172.16.238.11

hydra-tui-2:
image: ghcr.io/input-output-hk/hydra-tui:0.14.0
image: ghcr.io/input-output-hk/hydra-tui:unstable
build:
context: ../
target: hydra-tui
Expand All @@ -171,7 +171,7 @@ services:
ipv4_address: 172.16.238.21

hydra-tui-3:
image: ghcr.io/input-output-hk/hydra-tui:0.14.0
image: ghcr.io/input-output-hk/hydra-tui:unstable
build:
context: ../
target: hydra-tui
Expand Down
4 changes: 2 additions & 2 deletions demo/prepare-devnet.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ cp -af "$BASEDIR/hydra-cluster/config/devnet/" "$TARGETDIR"
cp -af "$BASEDIR/hydra-cluster/config/credentials" "$TARGETDIR"
cp -af "$BASEDIR/hydra-cluster/config/protocol-parameters.json" "$TARGETDIR"
echo '{"Producers": []}' > "$TARGETDIR/topology.json"
sed -i "s/\"startTime\": [0-9]*/\"startTime\": $(date +%s)/" "$TARGETDIR/genesis-byron.json" && \
sed -i "s/\"systemStart\": \".*\"/\"systemStart\": \"$(date -u +%FT%TZ)\"/" "$TARGETDIR/genesis-shelley.json"
sed -i.bak "s/\"startTime\": [0-9]*/\"startTime\": $(date +%s)/" "$TARGETDIR/genesis-byron.json" && \
sed -i.bak "s/\"systemStart\": \".*\"/\"systemStart\": \"$(date -u +%FT%TZ)\"/" "$TARGETDIR/genesis-shelley.json"

find $TARGETDIR -type f -exec chmod 0400 {} \;
mkdir "$TARGETDIR/ipc"
Expand Down
2 changes: 1 addition & 1 deletion demo/seed-devnet.sh
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ function hnode() {
docker run --rm -it \
--pull always \
-v ${SCRIPT_DIR}/devnet:/devnet \
ghcr.io/input-output-hk/hydra-node:0.14.0 -- ${@}
ghcr.io/input-output-hk/hydra-node:unstable -- ${@}
fi
}

Expand Down
8 changes: 4 additions & 4 deletions release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -117,28 +117,28 @@ update_cabal_version() {

for file in $cabal_files
do
sed -i -e "s,\(^version: *\)[^ ]*,\1$version," $file
sed -i.bak -e "s,\(^version: *\)[^ ]*,\1$version," $file
done
}

update_api_version() {
local version="$1" ; shift
local api_file=hydra-node/json-schemas/api.yaml

sed -i -e "s,\(version: *\)'.*',\1'$version'," $api_file
sed -i.bak -e "s,\(version: *\)'.*',\1'$version'," $api_file
}

update_tutorial_version() {
local version="$1"
local tutorial_file=docs/docs/tutorial/index.md
sed -i -e "s,\(hydra/releases/download/)[^/]*,\1$version," $tutorial_file
sed -i.bak -e "s,\(hydra/releases/download/)[^/]*,\1$version," $tutorial_file
}

update_demo_version() {
local version="$1"
(
cd demo
sed -i -e "s,\(ghcr.io/input-output-hk/hydra-[^:]*\):[^[:space:]]*,\1:$version," docker-compose.yaml seed-devnet.sh
sed -i.bak -e "s,\(ghcr.io/input-output-hk/hydra-[^:]*\):[^[:space:]]*,\1:$version," docker-compose.yaml seed-devnet.sh
)
}

Expand Down

0 comments on commit e54fe5d

Please sign in to comment.