-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(main): add update version scripts (#54)
Signed-off-by: cuisongliu <[email protected]>
- Loading branch information
1 parent
4a72280
commit d3ddc75
Showing
5 changed files
with
73 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -27,3 +27,4 @@ Dockerfile.cross | |
artifacts | ||
|
||
config/kubeconfigs | ||
replace_content.txt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
#!/bin/bash | ||
|
||
TAG=${1} | ||
|
||
if [ -z "$TAG" ]; then | ||
echo "Error: No version number provided." | ||
exit 1 | ||
fi | ||
VERSION=${TAG##*v} | ||
|
||
START_MARKER="<!--automq-operator release begin-->" | ||
END_MARKER="<!--automq-operator release end-->" | ||
|
||
|
||
echo " \`\`\`shell | ||
wget -q https://github.com/cuisongliu/automq-operator/releases/download/v${VERSION}/automq-operator-v${VERSION}-sealos.tgz | ||
mkdir -p automq-operator && tar -zxvf automq-operator-v${VERSION}-sealos.tgz -C automq-operator | ||
cd automq-operator/deploy && bash install.sh | ||
\`\`\`" > replace_content.txt | ||
|
||
awk -v start="$START_MARKER" -v end="$END_MARKER" -v newfile="replace_content.txt" ' | ||
BEGIN {printing=1} | ||
$0 ~ start {print;system("cat " newfile);printing=0} | ||
$0 ~ end {printing=1} | ||
printing' README.md > temp.txt && mv temp.txt README.md |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
#!/bin/bash | ||
|
||
TAG=${1} | ||
|
||
if [ -z "$TAG" ]; then | ||
echo "Error: No version number provided." | ||
exit 1 | ||
fi | ||
VERSION=${TAG##*v} | ||
|
||
START_MARKER="<!--automq-operator release sealos begin-->" | ||
END_MARKER="<!--automq-operator release sealos end-->" | ||
|
||
|
||
echo " \`\`\`shell | ||
sealos run ghcr.io/cuisongliu/automq-operator-sealos:v${VERSION} | ||
\`\`\`" > replace_content.txt | ||
|
||
awk -v start="$START_MARKER" -v end="$END_MARKER" -v newfile="replace_content.txt" ' | ||
BEGIN {printing=1} | ||
$0 ~ start {print;system("cat " newfile);printing=0} | ||
$0 ~ end {printing=1} | ||
printing' README.md > temp.txt && mv temp.txt README.md |