mirror of
https://github.com/threeal/cmake-action.git
synced 2025-04-21 19:11:21 +00:00
handle the default source dir in the process inputs step
This commit is contained in:
parent
8580c9d7bf
commit
186353f77a
@ -8,7 +8,6 @@ inputs:
|
||||
source-dir:
|
||||
description: Source directory of the CMake project
|
||||
required: false
|
||||
default: .
|
||||
build-dir:
|
||||
description: Build directory of the CMake project
|
||||
required: false
|
||||
@ -41,7 +40,11 @@ runs:
|
||||
id: process_inputs
|
||||
shell: bash
|
||||
run: |
|
||||
ARGS="'${{ inputs.source-dir }}' -B '${{ inputs.build-dir }}'"
|
||||
SOURCE_DIR="."
|
||||
if [ -n '${{ inputs.source-dir }}' ]; then
|
||||
SOURCE_DIR="${{ inputs.source-dir }}"
|
||||
fi
|
||||
ARGS="'$SOURCE_DIR' -B '${{ inputs.build-dir }}'"
|
||||
BUILD_ARGS="--build '${{ inputs.build-dir }}'"
|
||||
if [ -n '${{ inputs.targets }}' ]; then
|
||||
BUILD_ARGS="$BUILD_ARGS --target ${{ inputs.targets }}"
|
||||
|
Loading…
Reference in New Issue
Block a user