File tree 1 file changed +4
-2
lines changed
1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change 46
46
if [[ "$GITHUB_REF_TYPE" == "tag" ]]; then
47
47
echo -n "${GITHUB_REF#refs/tags/}-x64" > ./container_release
48
48
# Replace the version in backend/build.rs
49
- sed -i "s/main/$TAG /" backend/build.rs
49
+ sed -i "s/SH_VERSION= main/SH_VERSION=${GITHUB_REF#refs/tags/} /" backend/build.rs
50
50
else
51
51
echo -n "main-$(git rev-parse --short HEAD)-x64" > ./container_release
52
52
fi
@@ -92,12 +92,14 @@ jobs:
92
92
if [[ "$GITHUB_REF_TYPE" == "tag" ]]; then
93
93
echo -n "${GITHUB_REF#refs/tags/}-arm64" > ./container_release
94
94
# Replace the version in backend/build.rs
95
- sed -i "s/main/$TAG /" backend/build.rs
95
+ sed -i "s/SH_VERSION= main/SH_VERSION=${GITHUB_REF#refs/tags/} /" backend/build.rs
96
96
else
97
97
echo -n "main-$(git rev-parse --short HEAD)-arm64" > ./container_release
98
98
fi
99
+
99
100
# Export value to Github variables
100
101
echo "TAG=$(cat ./container_release)" >> $GITHUB_ENV
102
+
101
103
# Set the commit short hash (from the GitHub action variables) in the backend/build.rs
102
104
sed -i "s/current/$GITHUB_SHA/" backend/build.rs
103
105
You can’t perform that action at this time.
0 commit comments