add makefile and tag in getperl
This commit is contained in:
parent
c5d71a4da7
commit
331c908cb8
@ -337,6 +337,31 @@ fi
|
|||||||
cd $GITFiles/$RepoName
|
cd $GITFiles/$RepoName
|
||||||
cp $perlFiles/$RepoName/* .
|
cp $perlFiles/$RepoName/* .
|
||||||
|
|
||||||
|
# create the Makefile
|
||||||
|
cat > Makefile <<- _EOT
|
||||||
|
# Makefile for source rpm: daemontools
|
||||||
|
# $Id: Makefile,v 1.1 2016/02/04 12:24:52 vip-ire Exp $
|
||||||
|
NAME := daemontools
|
||||||
|
SPECFILE = $(firstword $(wildcard *.spec))
|
||||||
|
|
||||||
|
define find-makefile-common
|
||||||
|
for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done
|
||||||
|
endef
|
||||||
|
|
||||||
|
MAKEFILE_COMMON := $(shell $(find-makefile-common))
|
||||||
|
|
||||||
|
ifeq ($(MAKEFILE_COMMON),)
|
||||||
|
# attept a checkout
|
||||||
|
define checkout-makefile-common
|
||||||
|
test -f CVS/Root && { cvs -Q -d $$(cat CVS/Root) checkout common && echo "common/Makefile.common" ; } || { echo "ERROR: I can't figure out how to checkout the 'common' module." ; exit -1 ; } >&2
|
||||||
|
endef
|
||||||
|
|
||||||
|
MAKEFILE_COMMON := $(shell $(checkout-makefile-common))
|
||||||
|
endif
|
||||||
|
|
||||||
|
include $(MAKEFILE_COMMON)
|
||||||
|
_EOT
|
||||||
|
|
||||||
# Add file indicating which release and contribs or base - this is matched by the makefile with the contents of the branch file in the common directory
|
# Add file indicating which release and contribs or base - this is matched by the makefile with the contents of the branch file in the common directory
|
||||||
# to give the details of the release (EL7/8/9/ etc)
|
# to give the details of the release (EL7/8/9/ etc)
|
||||||
# This assumes SME10 and contribs10 or sme10 directory names, later releases can update the value in the file and Makefile should still work.
|
# This assumes SME10 and contribs10 or sme10 directory names, later releases can update the value in the file and Makefile should still work.
|
||||||
@ -590,6 +615,23 @@ git push --force -u $QUIET origin master
|
|||||||
#TAG=$VERSION"-"${RELEASE%.*}
|
#TAG=$VERSION"-"${RELEASE%.*}
|
||||||
#git tag -a $TAG -m "$COMMENT"
|
#git tag -a $TAG -m "$COMMENT"
|
||||||
#git push origin $TAG $QUIET
|
#git push origin $TAG $QUIET
|
||||||
|
# Now create the version and release tag from the specfile
|
||||||
|
VERSION_RELEASE_LONG=`rpm --queryformat '%{version} %{release}\n' --specfile $SPECFILE`
|
||||||
|
VERSION_RELEASE=${VERSION_RELEASE_LONG%%$'\n'*}
|
||||||
|
VERSION=${VERSION_RELEASE% *}
|
||||||
|
VERSION=${VERSION//./_}
|
||||||
|
RELEASE=${VERSION_RELEASE#* }
|
||||||
|
TAG=$VERSION"-"${RELEASE%.*}
|
||||||
|
if [ $DEBUG ] ; then
|
||||||
|
echo "VERSION_RELEASE=$VERSION_RELEASE"
|
||||||
|
echo "VERSION=$VERSION"
|
||||||
|
echo "RELEASE=$RELEASE"
|
||||||
|
echo "TAG=$TAG"
|
||||||
|
fi
|
||||||
|
git pull
|
||||||
|
git tag -a $TAG -m "Setting tag to current Version-Release in spec file: $TAG"
|
||||||
|
git push origin --tag $TAG $QUIET
|
||||||
|
|
||||||
|
|
||||||
echo "Created $RepoName Repo: $HTTP_URL - Comment:$COMMENT tag:$TAG"
|
echo "Created $RepoName Repo: $HTTP_URL - Comment:$COMMENT tag:$TAG"
|
||||||
exit 0
|
exit 0
|
||||||
|
Loading…
Reference in New Issue
Block a user