forked from SeaQL/seaography
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbump-version.sh
28 lines (24 loc) · 844 Bytes
/
bump-version.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#!/bin/bash
set -e
# Bump `seaography-generator` version
cd generator
sed -i 's/^version.*$/version = "'$1'"/' Cargo.toml
git commit -am "seaography-generator $1"
cd ..
sleep 1
# Bump `seaography-cli` version
cd cli
sed -i 's/^version.*$/version = "'$1'"/' Cargo.toml
sed -i 's/^seaography-generator [^,]*,/seaography-generator = { version = "~'$1'",/' Cargo.toml
git commit -am "seaography-cli $1"
cd ..
sleep 1
# Bump `seaography` version
sed -i 's/^version.*$/version = "'$1'"/' Cargo.toml
git commit -am "$1"
sleep 1
# Bump examples' dependency version
cd examples
find . -depth -type f -name '*.toml' -exec sed -i 's/^version = ".*" # seaography version$/version = "~'$1'" # seaography version/' {} \;
find . -depth -type f -name '*.toml' -exec sed -i 's/^version = "[0-9].*"$/version = "'$1'"/' {} \;
git commit -am "update examples"