Skip to content

Commit ac20fc3

Browse files
authored
docs(main): support arm64 release docs (#2510)
* docs(main): support arm64 release docs Signed-off-by: cuisongliu <cuisongliu@qq.com> * docs(main): support arm64 release docs Signed-off-by: cuisongliu <cuisongliu@qq.com> * docs(main): support arm64 release docs Signed-off-by: cuisongliu <cuisongliu@qq.com> --------- Signed-off-by: cuisongliu <cuisongliu@qq.com>
1 parent 5b69663 commit ac20fc3

7 files changed

Lines changed: 48 additions & 15 deletions

File tree

.github/workflows/release.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,6 @@ jobs:
101101
files: |
102102
./${{ env.OUTPUTDIR }}-x86_64.tar.gz
103103
./${{ env.OUTPUTDIR }}-aarch64.tar.gz
104-
105104
publish:
106105
name: Publish Packages
107106
needs: build

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,3 +22,4 @@ tags.temp
2222
/test.log
2323

2424
/tests/k8s/_out/
25+
replace_content.txt

crates/libcontainer/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ oci-spec = { version = "~0.6.4", features = ["runtime"] }
4343
once_cell = "1.18.0"
4444
procfs = "0.16.0"
4545
prctl = "1.0.0"
46-
libcgroups = { version = "0.3.0", path = "../libcgroups", default-features = false }
46+
libcgroups = { path = "../libcgroups", default-features = false, version = "0.3.0" } # MARK: Version
4747
libseccomp = { version = "0.3.0", optional = true }
4848
serde = { version = "1.0", features = ["derive"] }
4949
serde_json = "1.0"

crates/youki/Cargo.toml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,9 @@ features = ["std", "suggestions", "derive", "cargo", "help", "usage", "error-con
2929
[dependencies]
3030
anyhow = "1.0.75"
3131
chrono = { version = "0.4", default-features = false, features = ["clock", "serde"] }
32-
libcgroups = { version = "0.3.0", path = "../libcgroups", default-features = false }
33-
libcontainer = { version = "0.3.0", path = "../libcontainer", default-features = false }
34-
liboci-cli = { version = "0.3.0", path = "../liboci-cli" }
32+
libcgroups = { path = "../libcgroups", default-features = false, version = "0.3.0" } # MARK: Version
33+
libcontainer = { path = "../libcontainer", default-features = false, version = "0.3.0" } # MARK: Version
34+
liboci-cli = { path = "../liboci-cli", version = "0.3.0" } # MARK: Version
3535
nix = "0.27.1"
3636
once_cell = "1.18.0"
3737
pentacle = "1.0.0"
@@ -44,9 +44,9 @@ caps = "0.5.5"
4444
wasmer = { version = "4.0.0", optional = true }
4545
wasmer-wasix = { version = "0.9.0", optional = true }
4646
wasmedge-sdk = { version = "0.13.2", optional = true }
47-
wasmtime = {version = "10.0.2", optional = true }
48-
wasmtime-wasi = {version = "10.0.2", optional = true }
49-
tracing = { version = "0.1.40", features = ["attributes"]}
47+
wasmtime = { version = "10.0.2", optional = true }
48+
wasmtime-wasi = { version = "10.0.2", optional = true }
49+
tracing = { version = "0.1.40", features = ["attributes"] }
5050
tracing-subscriber = { version = "0.3.18", features = ["json", "env-filter"] }
5151
tracing-journald = "0.3.0"
5252

@@ -57,4 +57,4 @@ scopeguard = "1.2.0"
5757

5858
[build-dependencies]
5959
anyhow = "1.0.75"
60-
vergen = {version ="8.2.6", features =["git","gitcl"]}
60+
vergen = { version = "8.2.6", features = ["git", "gitcl"] }

docs/src/user/basic_setup.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,13 +46,15 @@ $ sudo dnf install \
4646
Install from the GitHub release.
4747
Note that this way also requires the aforementioned installation.
4848

49+
<!--youki release begin-->
4950
```console
50-
$ wget https://github.com/containers/youki/releases/download/v0.3.0/youki_0_3_0_linux.tar.gz
51-
$ tar -zxvf youki_0_3_0_linux.tar.gz youki_0_3_0_linux/youki-0.3.0/youki
51+
$ wget -qO youki_0_3_0_linux.tar.gz https://github.com/containers/youki/releases/download/v0.3.0/youki_0_3_0_linux.tar.gz
52+
$ tar -zxvf youki_0_3_0_linux.tar.gz --strip-components=1
5253
# Maybe you need root privileges.
53-
$ mv youki_0_3_0_linux/youki-0.3.0/youki /usr/local/bin/youki
54-
$ rm -rf youki_0_3_0_linux.tar.gz youki_0_3_0_linux
54+
$ mv youki-0.3.0/youki /usr/local/bin/youki
55+
$ rm -rf youki_0_3_0_linux.tar.gz youki-0_3_0
5556
```
57+
<!--youki release end-->
5658

5759
## Getting the source
5860

justfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -191,5 +191,5 @@ ci-musl-prepare: ci-prepare
191191
192192
version-up version:
193193
git grep -l "^version = .* # MARK: Version" | xargs sed -i 's/version = "[0-9]\.[0-9]\.[0-9]" # MARK: Version/version = "{{version}}" # MARK: Version/g'
194-
sed -i s/_[0-9]_[0-9]_[0-9]_/_{{ replace(version, '.', '_') }}_/g docs/src/user/basic_setup.md
195-
sed -i 's/[0-9]\.[0-9]\.[0-9]/{{version}}/g' docs/src/user/basic_setup.md
194+
git grep -l "} # MARK: Version" | grep -v justfile | xargs sed -i 's/version = "[0-9]\.[0-9]\.[0-9]" } # MARK: Version/version = "{{version}}" } # MARK: Version/g'
195+
{{ cwd }}/scripts/release_tag.sh {{version}}

scripts/release_tag.sh

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
#!/bin/bash
2+
3+
TAG=${1}
4+
5+
if [ -z "$TAG" ]; then
6+
echo "Error: No version number provided."
7+
exit 1
8+
fi
9+
VERSION=${TAG##*v}
10+
MAJOR=${VERSION%%.*}
11+
MINOR=${VERSION%.*}
12+
MINOR=${MINOR#*.}
13+
PATCH=${VERSION##*.}
14+
15+
START_MARKER="<!--youki release begin-->"
16+
END_MARKER="<!--youki release end-->"
17+
18+
19+
echo "\`\`\`console
20+
\$ wget -qO youki_${VERSION}_linux.tar.gz https://github.com/containers/youki/releases/download/v${VERSION}/youki_${MAJOR}_${MINOR}_${PATCH}_linux-\$(uname -m).tar.gz
21+
\$ tar -zxvf youki_${VERSION}_linux.tar.gz --strip-components=1
22+
# Maybe you need root privileges.
23+
\$ mv youki-${VERSION}/youki /usr/local/bin/youki
24+
\$ rm -rf youki_${VERSION}_linux.tar.gz youki-${VERSION}
25+
\`\`\`" > replace_content.txt
26+
27+
awk -v start="$START_MARKER" -v end="$END_MARKER" -v newfile="replace_content.txt" '
28+
BEGIN {printing=1}
29+
$0 ~ start {print;system("cat " newfile);printing=0}
30+
$0 ~ end {printing=1}
31+
printing' docs/src/user/basic_setup.md > temp.txt && mv temp.txt docs/src/user/basic_setup.md

0 commit comments

Comments
 (0)