mirror of
https://github.com/threeal/cmake-action.git
synced 2025-04-23 12:01:20 +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:
|
source-dir:
|
||||||
description: Source directory of the CMake project
|
description: Source directory of the CMake project
|
||||||
required: false
|
required: false
|
||||||
default: .
|
|
||||||
build-dir:
|
build-dir:
|
||||||
description: Build directory of the CMake project
|
description: Build directory of the CMake project
|
||||||
required: false
|
required: false
|
||||||
@ -41,7 +40,11 @@ runs:
|
|||||||
id: process_inputs
|
id: process_inputs
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
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 }}'"
|
BUILD_ARGS="--build '${{ inputs.build-dir }}'"
|
||||||
if [ -n '${{ inputs.targets }}' ]; then
|
if [ -n '${{ inputs.targets }}' ]; then
|
||||||
BUILD_ARGS="$BUILD_ARGS --target ${{ inputs.targets }}"
|
BUILD_ARGS="$BUILD_ARGS --target ${{ inputs.targets }}"
|
||||||
|
Loading…
Reference in New Issue
Block a user