File tree 1 file changed +3
-3
lines changed
1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change 3
3
on_push_pkg () {
4
4
BRANCH=$( git symbolic-ref --quiet HEAD)
5
5
BRANCH=" ${BRANCH# refs/ heads/ } "
6
- VERSION=" v$( sed -n ' s /^version = "\(.*\)"/\1/p' Cargo.toml) "
6
+ VERSION=" v$( sed -n ' /^version = "\(.*\)"/{s// \1/p;q} ' Cargo.toml) "
7
7
echo " $BRANCH -> upstream/$BRANCH "
8
8
echo " $BRANCH -> upstream/pkg/$VERSION "
9
9
10
10
git push upstream " $BRANCH " " $BRANCH :pkg/$VERSION "
11
11
}
12
12
13
13
on_tag () {
14
- VERSION=" v$( sed -n ' s /^version = "\(.*\)"/\1/p' Cargo.toml) "
14
+ VERSION=" v$( sed -n ' /^version = "\(.*\)"/{s// \1/p;q} ' Cargo.toml) "
15
15
git tag -s -m " $VERSION " " $VERSION "
16
16
}
17
17
18
18
on_push_tag () {
19
- VERSION=" v$( sed -n ' s /^version = "\(.*\)"/\1/p' Cargo.toml) "
19
+ VERSION=" v$( sed -n ' /^version = "\(.*\)"/{s// \1/p;q} ' Cargo.toml) "
20
20
git push upstream " $VERSION "
21
21
}
22
22
You can’t perform that action at this time.
0 commit comments