From c5800c3e1486615b2f99bb3e5b33dde214f427a4 Mon Sep 17 00:00:00 2001 From: Trevor Batley Date: Tue, 26 Mar 2024 17:21:10 +1100 Subject: [PATCH] Get tarball extension for lfs --- git-getperl.sh | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/git-getperl.sh b/git-getperl.sh index 5786dd9..bb4f8cf 100755 --- a/git-getperl.sh +++ b/git-getperl.sh @@ -228,6 +228,9 @@ if [[ $GOTONE -eq 0 ]] ; then exit 1 fi +# Get the tarball file extension +EXT=$(cat "$(basename $SPECFILE)" | grep -i ^Source | head -n 1 | sed -r 's/^[S|s]ource[0..9]?:\s?//' | xargs basename | sed -E 's/^([^.]*\.)(.*)$/\2/') + # Create the local Git repository GITFiles=$WORKDIR/$ORGGITEA mkdir -p $GITFiles @@ -608,13 +611,6 @@ git remote add origin "$GITEAHOST/$ORGGITEA/$RepoName.git" #GIT_SSL_NO_VERIFY=true git push --force -u $QUIET origin master git push --force -u $QUIET origin master -# Now create the version and release tag for these files -#RELEASE=`rpm --queryformat '%{release}\n' --specfile $SPECFILE | head -n 1` -# Release is not reliable - if you run on Rocky it comes back EL8, centos 7 - EL7 -# So, we need to just take the build part (first word) -#TAG=$VERSION"-"${RELEASE%.*} -#git tag -a $TAG -m "$COMMENT" -#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'*}