From b0e51d5a52be2b156589b50df75d85251560dc74 Mon Sep 17 00:00:00 2001 From: DanyLE Date: Mon, 29 Apr 2024 10:20:52 +0200 Subject: [PATCH] ci: export build file to public release --- Jenkinsfile | 17 +++++++++++++++++ Makefile | 17 ++++++++++++++++- 2 files changed, 33 insertions(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index bd05875..cfb2802 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -106,6 +106,23 @@ pipeline { } } } + stage('Copy doc') { + steps { + sh''' + DOCDIR=/home/dany/public/antos-release/doc/ make doc + SDKDIR=/home/dany/public/antos-release/sdk/ make sdk + ''' + } + } + stage('Copy Binaries') { + steps { + sh''' + BINDIR="/home/dany/public/antos-release/binaries/" + find ./build/ -name "*.deb" -exec install -Dm 755 "{}" "$BINDIR/deb" \\; + find ./build/ -name "*.AppImage" -exec install -Dm 755 "{}" "$BINDIR/appimg" \\; + ''' + } + } stage('Archive') { steps { script { diff --git a/Makefile b/Makefile index d588330..0e72596 100644 --- a/Makefile +++ b/Makefile @@ -11,6 +11,8 @@ RUSTUP_HOME?=/opt/rust CARGO_HOME?=/opt/rust/cargo BUILDDIR?=$(ROOT_DIR)/build/ DESTDIR?=/ +DOCDIR?=$(ROOT_DIR)/build/doc/ +SDKDIR?=$(ROOT_DIR)/build/sdk/ ifeq ('$(ARCH)','amd64') RUST_TARGET?=x86_64-unknown-linux-gnu @@ -185,6 +187,19 @@ appimg: docker: scripts/mkdocker.sh $(DOCKER_IMAGE):$(DOCKER_TAG) - + +doc: + mkdir -p $(DOCDIR)/$(VERSION) + VERSION=$(VERSION) BUILDID=$(BUILDID) DOCDIR=$(DOCDIR)/$(VERSION) make -C antos-frontend doc + +sdk: + mkdir -p $(SDKDIR)/$(VERSION) + cp antos-frontend/d.ts/* $(SDKDIR)/$(VERSION) + -rm $(SDKDIR)/versions.txt + @for file in $(SDKDIR)/*; do \ + echo $$file; \ + echo $$(basename $$file) >> $(SDKDIR)/versions.txt; \ + done + # --push .PHONY: antd antos docker \ No newline at end of file