Skip to content

Commit

Permalink
Add "make snapshot" target for building packages from develop branch
Browse files Browse the repository at this point in the history
tendrl-bug-id: Tendrl#209

Signed-off-by: Timothy Asir J <tjeyasin@redhat.com>
  • Loading branch information
TimothyAsirJeyasing committed Jul 4, 2017
1 parent ca0b42b commit 808bbc5
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 2 deletions.
19 changes: 18 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ dist:
cp -fr $(BASEDIR) $(HOME)/$(BUILDS)/$(TARDIR)
cd $(HOME)/$(BUILDS); \
tar --exclude-vcs --exclude=.* -zcf tendrl-api-$(VERSION).tar.gz $(TARDIR); \
cp tendrl-api-$(VERSION).tar.gz $(RPMBUILD)/SOURCES
cp tendrl-api-$(VERSION).tar.gz $(RPMBUILD)/SOURCES; \
cp tendrl-api-$(VERSION).tar.gz $(BASEDIR)/.
# Cleaning the work directory
rm -fr $(HOME)/$(BUILDS)

Expand All @@ -36,3 +37,19 @@ rpm:
printf "\nThe tendrl-api RPMs are located at:\n\n"; \
printf " $(DEPLOY)/latest\n\n\n\n"; \
fi

srpm:
@echo "target: rpm"
@echo " ...building rpm $(V_ARCH)..."
rm -fr $(BUILDS)
mkdir -p $(DEPLOY)/latest
mkdir -p $(RPMBUILD)/SPECS
sed -e "s/@VERSION@/$(VERSION)/" tendrl-api.spec \
> $(RPMBUILD)/SPECS/tendrl-api.spec
rpmbuild --define "_sourcedir ." --define "_srcrpmdir ." --nodeps -bs tendrl-api.spec

update-release:
sed -i tendrl-api.spec \
-e "/^Release:/cRelease: $(shell date +"%m_%d_%Y_%H_%M_%S")"

snapshot: update-release srpm
2 changes: 1 addition & 1 deletion tendrl-api.spec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Name: tendrl-api
Version: 1.4.1
Release: 1%{?dist}
Release: 07_04_2017_19_04_17
Summary: Collection of tendrl api extensions
Group: Development/Languages
License: LGPLv2+
Expand Down

0 comments on commit 808bbc5

Please sign in to comment.