Skip to content

Commit 9c5495f

Browse files
authored
Merge pull request #3626 from autonomys/bump-bin-versions
Bump binary crate versions to 0.1.1
2 parents 3bba61d + 10a2b28 commit 9c5495f

9 files changed

Lines changed: 127 additions & 11 deletions

File tree

Cargo.lock

Lines changed: 21 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
[package]
2+
name = "subspace-bootstrap-node"
3+
version = "0.1.1"
4+
authors = [
5+
"Nazar Mokrynskyi <nazar@mokrynskyi.com>",
6+
"Shamil Gadelshin <shamilgadelshin@gmail.com>"
7+
]
8+
description = "A Bootstrap node for the Subspace Network Blockchain"
9+
edition.workspace = true
10+
license = "0BSD"
11+
homepage = "https://subspace.network"
12+
repository = "https://github.com/autonomys/subspace"
13+
include = [
14+
"/src",
15+
"/Cargo.toml",
16+
]
17+
18+
[package.metadata.docs.rs]
19+
targets = ["x86_64-unknown-linux-gnu"]
20+
21+
[dependencies]
22+
clap = { workspace = true, features = ["color", "derive"] }
23+
futures.workspace = true
24+
hex.workspace = true
25+
libp2p = { workspace = true, features = ["kad"] }
26+
prometheus-client.workspace = true
27+
serde = { workspace = true, features = ["derive"] }
28+
serde_json.workspace = true
29+
subspace-logging.workspace = true
30+
subspace-metrics.workspace = true
31+
subspace-networking.workspace = true
32+
tokio = { workspace = true, features = ["macros", "parking_lot", "rt-multi-thread"] }
33+
tracing.workspace = true

crates/subspace-networking/src/bin/subspace-bootstrap-node/main.rs renamed to crates/subspace-bootstrap-node/src/main.rs

File renamed without changes.

crates/subspace-farmer/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
name = "subspace-farmer"
33
description = "Farmer for the Subspace Network Blockchain"
44
license = "0BSD"
5-
version = "0.1.0"
5+
version = "0.1.1"
66
authors = ["Nazar Mokrynskyi <nazar@mokrynskyi.com>"]
77
edition.workspace = true
88
include = [

crates/subspace-gateway/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "subspace-gateway"
3-
version = "0.1.0"
3+
version = "0.1.1"
44
authors = [
55
"Teor <teor@riseup.net>",
66
"Shamil Gadelshin <shamilgadelshin@gmail.com>"

crates/subspace-networking/Cargo.toml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ fs2.workspace = true
2727
futures.workspace = true
2828
futures-timer.workspace = true
2929
hex.workspace = true
30+
libp2p = { workspace = true, features = ["autonat", "dns", "gossipsub", "identify", "kad", "macros", "metrics", "noise", "ping", "plaintext", "request-response", "serde", "tcp", "tokio", "yamux"] }
3031
memmap2.workspace = true
3132
multihash = { workspace = true, features = ["scale-codec"] }
3233
nohash-hasher.workspace = true
@@ -36,8 +37,6 @@ pin-project.workspace = true
3637
prometheus-client.workspace = true
3738
rand.workspace = true
3839
schnellru.workspace = true
39-
serde = { workspace = true, features = ["derive"] }
40-
serde_json.workspace = true
4140
subspace-core-primitives.workspace = true
4241
subspace-logging.workspace = true
4342
subspace-metrics.workspace = true
@@ -47,7 +46,6 @@ tokio-stream.workspace = true
4746
tracing.workspace = true
4847
unsigned-varint = { workspace = true, features = ["futures", "asynchronous_codec"] }
4948
void.workspace = true
50-
libp2p = { workspace = true, features = ["autonat", "dns", "gossipsub", "identify", "kad", "macros", "metrics", "noise", "ping", "plaintext", "request-response", "serde", "tcp", "tokio", "yamux"] }
5149

5250
[dev-dependencies]
5351
rand.workspace = true

crates/subspace-node/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "subspace-node"
3-
version = "0.1.0"
3+
version = "0.1.1"
44
authors = ["Subspace Labs <https://subspace.network>"]
55
description = "A Subspace Network Blockchain node."
66
edition.workspace = true

docker/.dockerignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1+
# Exclude everything
12
*
3+
# Then just include only the files required for builds
24
!/crates
35
!/domains
46
!/shared

scripts/bump-versions.sh

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
#!/usr/bin/env bash
2+
3+
# http://redsymbol.net/articles/unofficial-bash-strict-mode/
4+
set -euo pipefail
5+
6+
if [[ "$#" -ne 2 ]]; then
7+
echo "Usage: $0 <old-version> <new-version>"
8+
exit 1
9+
fi
10+
11+
OLD_VERSION="$1"
12+
NEW_VERSION="$2"
13+
14+
# Users can set their own SED_IN_PLACE, for example, if their GNU sed is `gsed`
15+
if [[ -z "${SED_IN_PLACE[@]+"${SED_IN_PLACE[@]}"}" ]]; then
16+
if [[ "$(uname)" == "Darwin" ]]; then
17+
# BSD sed requires a space between -i and the backup extension
18+
SED_IN_PLACE=(sed -i "")
19+
else
20+
# Assume everything else has GNU sed, where the backup extension is optional
21+
SED_IN_PLACE=(sed --in-place)
22+
fi
23+
fi
24+
25+
echo "Current directory: $(pwd)"
26+
if [[ ! -d "./crates/subspace-node" ]] || [[ ! -d "./crates/subspace-gateway" ]] || [[ ! -d "./crates/subspace-farmer" ]] || [[ ! -d "./crates/subspace-bootstrap-node" ]]; then
27+
echo "Changing to the root of the repository:"
28+
cd "$(dirname "$0")/.."
29+
echo "Current directory: $(pwd)"
30+
if [[ ! -d "./crates/subspace-node" ]] || [[ ! -d "./crates/subspace-gateway" ]] || [[ ! -d "./crates/subspace-farmer" ]] || [[ ! -d "./crates/subspace-bootstrap-node" ]]; then
31+
echo "Missing ./crates/subspace-node, ./crates/subspace-gateway, ./crates/subspace-farmer or ./crates/subspace-bootstrap-node"
32+
echo "This script must be run from the base of an autonomys/subspace repository checkout"
33+
exit 1
34+
fi
35+
fi
36+
37+
# show executed commands
38+
set -x
39+
40+
echo "Replacing the old version ($OLD_VERSION) with the new version ($NEW_VERSION) in binary crates:"
41+
"${SED_IN_PLACE[@]}" -e "s/$OLD_VERSION/$NEW_VERSION/g" \
42+
./crates/subspace-node/Cargo.toml \
43+
./crates/subspace-gateway/Cargo.toml \
44+
./crates/subspace-farmer/Cargo.toml \
45+
./crates/subspace-bootstrap-node/Cargo.toml || (echo "'$SED_IN_PLACE' failed, please set \$SED_IN_PLACE to a valid sed in-place replacement command" && exit 1)
46+
47+
echo "Updating Cargo.lock..."
48+
cargo check
49+
50+
echo "Making sure the old version is not used anywhere else:"
51+
if ! grep --recursive --exclude-dir=target --exclude-dir=.git --exclude=Cargo.lock --exclude=Cargo.toml --fixed-strings "$OLD_VERSION" .; then
52+
# Stop showing executed commands
53+
set +x
54+
echo
55+
echo "==================================="
56+
echo "Success: all old versions replaced."
57+
echo "==================================="
58+
echo
59+
else
60+
echo
61+
echo "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"
62+
echo "Error: The old version ($OLD_VERSION) is still in use."
63+
echo "Please update this script ($0) to automatically replace it."
64+
echo "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"
65+
echo
66+
exit 1
67+
fi

0 commit comments

Comments
 (0)