diff options
Diffstat (limited to 'mkport.sh')
-rwxr-xr-x | mkport.sh | 23 |
1 files changed, 4 insertions, 19 deletions
@@ -6,24 +6,6 @@ port="x11/lumina" dfile="lumina" -which jq 2>/dev/null >/dev/null -if [ $? -ne 0 ] ; then - echo "Requires jq to be installed!" - exit 1 -fi - - -GITHUB_ORGANIZATION_NAME="trueos"; -REPO_NAME="trueos-core"; -COMMIT_SHA=$( fetch -o - https://api.github.com/repos/${GITHUB_ORGANIZATION_NAME}/${REPO_NAME}/commits/master 2>/dev/null | jq '.sha' | sed 's/"//g'); - -if [ -z "$COMMIT_SHA" ] ; then - echo "Failed to get sha of trueos-core commit" - exit 1 -fi - -ghtag="$COMMIT_SHA" - massage_subdir() { cd "$1" if [ $? -ne 0 ] ; then @@ -85,6 +67,9 @@ if [ -n "$OBJS" ] ; then exit 1 fi +# Get the GIT tag +ghtag=`git log -n 1 . | grep '^commit ' | awk '{print $2}'` + # Get the version if [ -e "version" ] ; then verTag=$(cat version) @@ -99,7 +84,7 @@ rm ${distdir}/${dfile}-* 2>/dev/null if [ -d "${portsdir}/${port}" ] ; then rm -rf ${portsdir}/${port} 2>/dev/null fi -cp -r port-files-master ${portsdir}/${port} +cp -r port-files ${portsdir}/${port} # Set the version numbers sed -i '' "s|%%CHGVERSION%%|${verTag}|g" ${portsdir}/${port}/Makefile |