Skip to content

Commit

Permalink
Merge pull request #53 from actiontech/fix-rpm-for-preview
Browse files Browse the repository at this point in the history
fix makefile for release
  • Loading branch information
sjjian authored Oct 29, 2021
2 parents 3c24238 + c57c35b commit 296cfff
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
8 changes: 5 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ parser:

upload:
curl --ftp-create-dirs -T $(shell pwd)/$(RPM_NAME) ftp://$(RELEASE_FTPD_HOST)/actiontech-$(PROJECT_NAME)/$(EDITION)/qa/$(PROJECT_VERSION)/$(RPM_NAME)
curl --ftp-create-dirs -T $(shell pwd)/$(RPM_NAME).md5 ftp://$(RELEASE_FTPD_HOST)/actiontech-$(PROJECT_NAME)/$(EDITION)/qa/$(PROJECT_VERSION)/$(RPM_NAME).md5

###################################### docker #####################################################

Expand All @@ -97,11 +98,12 @@ override RPM_NAME = $(PROJECT_NAME)-$(EDITION)-$(PROJECT_VERSION).$(RELEASE).$(O

docker_rpm: docker_install
$(DOCKER) run -v $(shell pwd):/universe/sqle --user root --rm $(RPM_BUILD_IMAGE) sh -c "(mkdir -p /root/rpmbuild/SOURCES >/dev/null 2>&1);cd /root/rpmbuild/SOURCES; \
(tar zcf ${PROJECT_NAME}.tar.gz /universe --transform 's/universe/${PROJECT_NAME}-${PROJECT_VERSION}_$(GIT_COMMIT)/' >/tmp/build.log 2>&1) && \
(tar zcf ${PROJECT_NAME}.tar.gz /universe --transform 's/universe/${PROJECT_NAME}-$(GIT_COMMIT)/' >/tmp/build.log 2>&1) && \
(rpmbuild --define 'group_name $(RPM_USER_GROUP_NAME)' --define 'user_name $(RPM_USER_NAME)' \
--define 'commit $(GIT_COMMIT)' --define 'os_version $(OS_VERSION)' --define 'project_version $(PROJECT_VERSION)' \
--define 'commit $(GIT_COMMIT)' --define 'os_version $(OS_VERSION)' \
--target $(RPMBUILD_TARGET) -bb --with qa /universe/sqle/build/sqled.spec >>/tmp/build.log 2>&1) && \
(cat ~/rpmbuild/RPMS/$(RPMBUILD_TARGET)/${PROJECT_NAME}-${PROJECT_VERSION}_$(GIT_COMMIT)-qa.$(OS_VERSION).$(RPMBUILD_TARGET).rpm) || (cat /tmp/build.log && exit 1)" > $(RPM_NAME)
(cat ~/rpmbuild/RPMS/$(RPMBUILD_TARGET)/${PROJECT_NAME}-$(GIT_COMMIT)-qa.$(OS_VERSION).$(RPMBUILD_TARGET).rpm) || (cat /tmp/build.log && exit 1)" > $(RPM_NAME) && \
md5sum $(RPM_NAME) > $(RPM_NAME).md5

override SQLE_DOCKER_IMAGE ?= actiontech/$(PROJECT_NAME)-$(EDITION):$(PROJECT_VERSION)

Expand Down
2 changes: 1 addition & 1 deletion build/sqled.spec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Summary: Actiontech Sqle
Name: sqle
Version: %{project_version}_%{commit}
Version: %{commit}
%if %{?_with_qa:1}%{!?_with_qa:0}
Release: qa.%{os_version}
%else
Expand Down

0 comments on commit 296cfff

Please sign in to comment.