Skip to content

Commit 9d73d74

Browse files
chore: remove UPX compression
1 parent 7e4e121 commit 9d73d74

File tree

4 files changed

+36
-75
lines changed

4 files changed

+36
-75
lines changed

.github/workflows/build-publish-to-oss.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
- name: Setup Go
2222
uses: actions/setup-go@v5
2323
with:
24-
go-version: '1.23'
24+
go-version: '1.24'
2525
- name: Build Release
2626
uses: goreleaser/goreleaser-action@v6
2727
with:

.github/workflows/build-publish-to-r2.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
- name: Setup Go
2222
uses: actions/setup-go@v5
2323
with:
24-
go-version: '1.23'
24+
go-version: '1.24'
2525
- name: Build Release
2626
uses: goreleaser/goreleaser-action@v6
2727
with:

.goreleaser.yaml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,6 @@ builds:
3333
- ppc64le
3434
- s390x
3535
- riscv64
36-
hooks:
37-
post:
38-
- ./ci/script.sh compress_binary {{ .Path }} {{ .Arch }}
3936

4037
- id: core
4138
dir: core
@@ -59,9 +56,6 @@ builds:
5956
- ppc64le
6057
- s390x
6158
- riscv64
62-
hooks:
63-
post:
64-
- ./ci/script.sh compress_binary {{ .Path }} {{ .Arch }}
6559

6660
archives:
6761
- formats: [ 'tar.gz' ]

ci/script.sh

Lines changed: 34 additions & 67 deletions
Original file line numberDiff line numberDiff line change
@@ -2,72 +2,39 @@
22

33
set -e
44

5-
download_resources() {
6-
command -v wget >/dev/null || {
7-
echo "wget not found, please install it and try again."
8-
exit 1
9-
}
10-
11-
if [ ! -f "1pctl" ]; then
12-
wget https://github.com/1Panel-dev/installer/raw/v2/1pctl
13-
fi
14-
15-
if [ ! -f "install.sh" ]; then
16-
wget https://github.com/1Panel-dev/installer/raw/v2/install.sh
17-
fi
18-
19-
if [ ! -d "initscript" ]; then
20-
wget https://github.com/1Panel-dev/installer/raw/v2/initscript/1panel-core.service
21-
wget https://github.com/1Panel-dev/installer/raw/v2/initscript/1panel-agent.service
22-
mkdir -p initscript && cd initscript
23-
for file in 1panel-core.init 1panel-agent.init 1panel-core.openrc 1panel-agent.openrc 1panel-core.procd 1panel-agent.procd 1panel-core.service 1panel-agent.service; do
24-
wget -q https://github.com/1Panel-dev/installer/raw/v2/initscript/$file
25-
done
26-
cd ..
27-
fi
28-
29-
if [ ! -d "lang" ]; then
30-
mkdir -p lang && cd lang
31-
for lang in en fa pt-BR ru zh; do
32-
wget -q https://github.com/1Panel-dev/installer/raw/v2/lang/$lang.sh
33-
done
34-
cd ..
35-
fi
36-
37-
if [ ! -f "GeoIP.mmdb" ]; then
38-
wget https://resource.fit2cloud.com/1panel/package/v2/geo/GeoIP.mmdb
39-
fi
40-
41-
chmod 755 1pctl install.sh
42-
}
43-
44-
compress_binary() {
45-
local binary_path="$1"
46-
local arch="$2"
47-
48-
echo "Attempting to compress: $binary_path for arch: $arch"
49-
50-
if [ "$arch" = "s390x" ]; then
51-
echo "Skipping UPX compression for s390x"
52-
return
53-
fi
54-
55-
if ! command -v upx >/dev/null; then
56-
echo "Installing upx..."
57-
if [ "$(uname -m)" = "s390x" ]; then
58-
echo "UPX not supported on s390x"
59-
return
60-
fi
61-
62-
sudo apt-get update
63-
sudo apt-get install -y upx-ucl
64-
fi
65-
66-
upx --best --lzma "$binary_path" && echo "[ok] Compressed: $binary_path" || echo "[warn] Failed to compress: $binary_path"
5+
command -v wget >/dev/null || {
6+
echo "wget not found, please install it and try again."
7+
exit 1
678
}
689

69-
if [ "$1" = "compress_binary" ]; then
70-
compress_binary "$2" "$3"
71-
else
72-
download_resources
73-
fi
10+
if [ ! -f "1pctl" ]; then
11+
wget https://github.com/1Panel-dev/installer/raw/v2/1pctl
12+
fi
13+
14+
if [ ! -f "install.sh" ]; then
15+
wget https://github.com/1Panel-dev/installer/raw/v2/install.sh
16+
fi
17+
18+
if [ ! -d "initscript" ]; then
19+
wget https://github.com/1Panel-dev/installer/raw/v2/initscript/1panel-core.service
20+
wget https://github.com/1Panel-dev/installer/raw/v2/initscript/1panel-agent.service
21+
mkdir -p initscript && cd initscript
22+
for file in 1panel-core.init 1panel-agent.init 1panel-core.openrc 1panel-agent.openrc 1panel-core.procd 1panel-agent.procd 1panel-core.service 1panel-agent.service; do
23+
wget -q https://github.com/1Panel-dev/installer/raw/v2/initscript/$file
24+
done
25+
cd ..
26+
fi
27+
28+
if [ ! -d "lang" ]; then
29+
mkdir -p lang && cd lang
30+
for lang in en fa pt-BR ru zh; do
31+
wget -q https://github.com/1Panel-dev/installer/raw/v2/lang/$lang.sh
32+
done
33+
cd ..
34+
fi
35+
36+
if [ ! -f "GeoIP.mmdb" ]; then
37+
wget https://resource.fit2cloud.com/1panel/package/v2/geo/GeoIP.mmdb
38+
fi
39+
40+
chmod 755 1pctl install.sh

0 commit comments

Comments
 (0)