fix suppress statements

This commit is contained in:
Trevor Batley 2023-05-22 11:49:42 +10:00
parent 1498c42a41
commit 59b371fdd3

View File

@ -134,7 +134,7 @@ fi
# Make sure credentials taken from store # Make sure credentials taken from store
# The first time you pull or push it will ask for credentials and then save them in a file. # The first time you pull or push it will ask for credentials and then save them in a file.
git config --global credential.helper store $suppress git config --global credential.helper store "$suppress"
# #
# Clone the CVS repository # Clone the CVS repository
@ -227,7 +227,7 @@ if [ "$RESPONSE" == "200" ]; then
# And Clone it # And Clone it
if [ $DEBUG ] ; then echo "git clone $GITEAHOST/$ORGGITEA/$1.git" ; fi if [ $DEBUG ] ; then echo "git clone $GITEAHOST/$ORGGITEA/$1.git" ; fi
cd $GITFiles cd $GITFiles
git clone "$GITEAHOST/$ORGGITEA/$1.git" $suppress git clone "$GITEAHOST/$ORGGITEA/$1.git" "$suppress"
#GIT_SSL_NO_VERIFY=true git clone "$GITEAHOST/$ORGGITEA/$1.git" #GIT_SSL_NO_VERIFY=true git clone "$GITEAHOST/$ORGGITEA/$1.git"
NOREPO=0 NOREPO=0
else else
@ -337,7 +337,7 @@ fi
# Pull in the auto created or updated files # Pull in the auto created or updated files
cd $GITFiles cd $GITFiles
#GIT_SSL_NO_VERIFY=true git clone "$GITEAHOST/$ORGGITEA/$1.git" #GIT_SSL_NO_VERIFY=true git clone "$GITEAHOST/$ORGGITEA/$1.git"
git clone "$GITEAHOST/$ORGGITEA/$1.git" $suppress git clone "$GITEAHOST/$ORGGITEA/$1.git" "$suppress"
if [ ! -d $GITFiles/$1 ] ; then if [ ! -d $GITFiles/$1 ] ; then
echo "ERROR*******Unable to access the new repo directory for $HTTP_URL $GITFiles/$1" echo "ERROR*******Unable to access the new repo directory for $HTTP_URL $GITFiles/$1"
@ -349,7 +349,7 @@ cd $CVSFiles/$1/$BASEORCONTRIB
# Fully populate the directory (gets the tar file - which is not strictly in CVS) and creates the directory source tree # Fully populate the directory (gets the tar file - which is not strictly in CVS) and creates the directory source tree
# applying the patches to the base in the tar file. # applying the patches to the base in the tar file.
# Might need to replace this by the code from the makefile if we decide to move "make prep" to git moe likely we'll implement a new one "make gitprep". # Might need to replace this by the code from the makefile if we decide to move "make prep" to git moe likely we'll implement a new one "make gitprep".
make prep $suppress make prep "$suppress"
# Extract the directory name for the file tree (it will include the name of the module plus some version information) # Extract the directory name for the file tree (it will include the name of the module plus some version information)
# Same trick that we use in the makefile.common - taking the name and verison from the .spec file. # Same trick that we use in the makefile.common - taking the name and verison from the .spec file.
@ -516,9 +516,9 @@ else
# Third party package # Third party package
# copy over the archive file and make sure the extension is tracked by git-lfs # copy over the archive file and make sure the extension is tracked by git-lfs
if [ $DEBUG ] ; then echo "************Found 3rd party package $NAME" ; fi if [ $DEBUG ] ; then echo "************Found 3rd party package $NAME" ; fi
git lfs install $suppress git lfs install "$suppress"
git lfs track "*.$EXT" $suppress git lfs track "*.$EXT" "$suppress"
git add .gitattributes $suppress git add .gitattributes "$suppress"
#git config lfs.http://gitea.bjsystems.co.uk/SMEContribs/bugzilla.git/info/lfs.locksverify true #git config lfs.http://gitea.bjsystems.co.uk/SMEContribs/bugzilla.git/info/lfs.locksverify true
if [[ -f $CVSFiles/$1/$BASEORCONTRIB/$ARCHIVEFILE ]] ; then if [[ -f $CVSFiles/$1/$BASEORCONTRIB/$ARCHIVEFILE ]] ; then
if [ $DEBUG ] ; then echo "************Copying archivefile $CVSFiles/$1/$BASEORCONTRIB/$ARCHIVEFILE" ; fi if [ $DEBUG ] ; then echo "************Copying archivefile $CVSFiles/$1/$BASEORCONTRIB/$ARCHIVEFILE" ; fi
@ -535,7 +535,7 @@ if [[ $ARCHIVEFILE != "$TREEPATH.tar.gz" ]] ; then
fi fi
# Take out any bogus dates: # Take out any bogus dates:
/usr/bin/BogusDateBot.sh $(basename $SPECFILE) $suppress /usr/bin/BogusDateBot.sh $(basename $SPECFILE) "$suppress"
# If it is an SME package, take out the patches and then update the release. # If it is an SME package, take out the patches and then update the release.
if [[ "$NAME" =~ ^(smeserver-|e-smith-).* ]]; then if [[ "$NAME" =~ ^(smeserver-|e-smith-).* ]]; then
@ -590,7 +590,7 @@ if [ ! -e $GITFiles/common ]; then
else else
# Just refresh it # Just refresh it
cd $GITFiles/common cd $GITFiles/common
git pull $suppress git pull "$suppress"
fi fi
# Now make sure that the make-archive is executible # Now make sure that the make-archive is executible
@ -732,24 +732,24 @@ if [ $DEBUG ] ; then echo $RESPONSE ; fi
cd $GITFiles/$1 cd $GITFiles/$1
# stage and commit all the files created locally # stage and commit all the files created locally
git add -A $suppress git add -A "$suppress"
echo "$1 git status" >>gitstatus.log echo "$1 git status" >>gitstatus.log
git status >>gitstatus.log git status >>gitstatus.log
git status $suppress git status "$suppress"
COMMENT="initial commit of file from CVS for $1 on `date`" COMMENT="initial commit of file from CVS for $1 on `date`"
git commit -m "$COMMENT" $QUIET git commit -m "$COMMENT" $QUIET
# push the converted git repository to the remote # push the converted git repository to the remote
git remote remove origin $suppress git remote remove origin "$suppress"
git remote add origin "$GITEAHOST/$ORGGITEA/$1.git" $suppress git remote add origin "$GITEAHOST/$ORGGITEA/$1.git" "$suppress"
#GIT_SSL_NO_VERIFY=true git push --force -u $QUIET origin master #GIT_SSL_NO_VERIFY=true git push --force -u $QUIET origin master
git push --force -u $QUIET origin master $suppress git push --force -u $QUIET origin master "$suppress"
# Now create the version and release tag for these files # Now create the version and release tag for these files
RELEASE=`rpm --queryformat '%{release}\n' --specfile $NAME.spec | head -n 1` RELEASE=`rpm --queryformat '%{release}\n' --specfile $NAME.spec | head -n 1`
TAG=$VERSION-$RELEASE TAG=$VERSION-$RELEASE
git tag -a $TAG -m "$COMMENT" $suppress git tag -a $TAG -m "$COMMENT" "$suppress"
git push origin $TAG $suppress git push origin $TAG "$suppress"
echo "Created $1 Repo: $HTTP_URL - Comment:$COMMENT tag:$TAG" echo "Created $1 Repo: $HTTP_URL - Comment:$COMMENT tag:$TAG"
exit 0 exit 0