Allow building in a subdirectory
This commit is contained in:
+6
-3
@@ -11,6 +11,9 @@ inputs:
|
||||
fedora_release:
|
||||
description: The fedora release version to build for
|
||||
required: true
|
||||
specdir:
|
||||
description: A directory to switch to before trying to find a spec file.
|
||||
required: false
|
||||
specfile:
|
||||
description: The filename of the spec file to build. If not set and there is only 1 specfile, it will be selected automatically.
|
||||
required: false
|
||||
@@ -22,12 +25,12 @@ runs:
|
||||
shell: bash
|
||||
run: |
|
||||
set -e
|
||||
echo Switching to ${{ gitea.workspace }} to prepare ${{ gitea.repository }}
|
||||
cd ${{ gitea.workspace }}
|
||||
echo Switching to ${{ gitea.workspace }}/${{ inputs.specdir }} to prepare a src.rpm from ${{ gitea.repository }}
|
||||
cd ${{ gitea.workspace }}/${{ inputs.specdir }}
|
||||
|
||||
# Derive the name of the .spec file
|
||||
SPECFILE=$([ "${{ inputs.specfile }}" ] && echo -n "${{ inputs.specfile }}" || echo -n $([ $(ls -1 *.spec 2>/dev/null| wc -l) -eq 1 ] && echo -n "$(ls -1 *.spec)"))
|
||||
[ "$SPECFILE" == "" ] && exit 1
|
||||
[ "$SPECFILE" == "" ] && echo Could\'t find a singular spec file to use && exit 1
|
||||
echo Specfile is $SPECFILE
|
||||
|
||||
echo Downloading source archive
|
||||
|
||||
Reference in New Issue
Block a user