fix: use python3 zipfile instead of zip binary for packaging
The almalinux9-gobuilder image doesn't have the zip binary and dnf install is unreliable in CI. python3 is always available.
This commit is contained in:
@@ -5,7 +5,6 @@ steps:
|
|||||||
- name: package
|
- name: package
|
||||||
image: git.unkin.net/unkin/almalinux9-gobuilder:20260606
|
image: git.unkin.net/unkin/almalinux9-gobuilder:20260606
|
||||||
commands:
|
commands:
|
||||||
- apt-get update && apt-get install -y zip
|
|
||||||
- make package VERSION=${CI_COMMIT_TAG}
|
- make package VERSION=${CI_COMMIT_TAG}
|
||||||
|
|
||||||
- name: upload
|
- name: upload
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ fmt: check-go
|
|||||||
|
|
||||||
package: build
|
package: build
|
||||||
cp $(BINARY) $(BINARY)_v$(INSTALL_VERSION)
|
cp $(BINARY) $(BINARY)_v$(INSTALL_VERSION)
|
||||||
zip $(ZIP) $(BINARY)_v$(INSTALL_VERSION)
|
python3 -c "import zipfile,sys; z=zipfile.ZipFile(sys.argv[1],'w',zipfile.ZIP_DEFLATED); z.write(sys.argv[2]); z.close()" $(ZIP) $(BINARY)_v$(INSTALL_VERSION)
|
||||||
rm $(BINARY)_v$(INSTALL_VERSION)
|
rm $(BINARY)_v$(INSTALL_VERSION)
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
|
|||||||
Reference in New Issue
Block a user