Skip to content
This repository was archived by the owner on Aug 2, 2024. It is now read-only.

Commit 0a743be

Browse files
committed
Add a script to check for various things before releasing
1 parent da91cf2 commit 0a743be

File tree

3 files changed

+21
-3
lines changed

3 files changed

+21
-3
lines changed

make-release.sh

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
#!/usr/bin/env bash
2+
3+
set -xe
4+
5+
COMMIT_HASH=$(git rev-parse HEAD)
6+
SHORT_HASH=${COMMIT_HASH:0:10}
7+
docker pull "ghcr.io/modus-continens/modus-buildkit-frontend:$SHORT_HASH"
8+
9+
MODUS_LIB_VERSION=$(cargo metadata --format-version 1 | jq -r '.packages[]|select(.name=="modus-lib").version')
10+
MODUS_VERSION=$(cargo metadata --format-version 1 | jq -r '.packages[]|select(.name=="modus").version')
11+
if [ "$MODUS_LIB_VERSION" != "$MODUS_VERSION" ]; then
12+
echo -e "\e[31;1mmodus-lib and modus versions do not match!\e[0m"
13+
exit 1
14+
fi
15+
16+
cargo publish -p modus-lib
17+
cargo update --dry-run # to refresh registry cache, so that the following cargo command is aware of the new version in crates.io
18+
cargo publish -p modus

modus-lib/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "modus-lib"
3-
version = "0.1.6"
3+
version = "0.1.7"
44
authors = ["University College London"]
55
edition = "2018"
66
license = "AGPL-3.0"

modus/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "modus"
3-
version = "0.1.6"
3+
version = "0.1.7"
44
authors = ["University College London"]
55
edition = "2018"
66
default-run = "modus"
@@ -21,7 +21,7 @@ name = "buildkit-frontend"
2121
path = "src/buildkit_frontend.rs"
2222

2323
[dependencies]
24-
modus-lib = { version = "=0.1.6", path = "../modus-lib" }
24+
modus-lib = { version = "=0.1.7", path = "../modus-lib" }
2525

2626
clap = { version = "3", features = ["cargo"] }
2727
colored = "2"

0 commit comments

Comments
 (0)