mirror of
https://github.com/sp-tarkov/build.git
synced 2025-02-13 03:30:45 -05:00
Refactor build type determination logic in build.yaml
This commit is contained in:
parent
9d0787fdf9
commit
f16d4c7823
@ -49,21 +49,16 @@ jobs:
|
|||||||
echo "Tags: ${{ steps.cache-keys.outputs.tags }}"
|
echo "Tags: ${{ steps.cache-keys.outputs.tags }}"
|
||||||
shell: bash
|
shell: bash
|
||||||
|
|
||||||
- name: Build Type
|
- name: Determine Build Type
|
||||||
id: build-type
|
id: build-type
|
||||||
run: |
|
run: |
|
||||||
IFS=$'\n' read -r -d '' -a ADDR <<< "${{ steps.cache-keys.outputs.tags }}" || true
|
TAGS="${{ steps.cache-keys.outputs.tags }}"
|
||||||
BUILD_TYPE="debug" # Default
|
BUILD_TYPE="debug" # Default
|
||||||
for TAG in "${ADDR[@]}"; do
|
if [[ "$TAGS" =~ -BE ]]; then
|
||||||
RELEASE_BUILD_REGEX='^(v?\d+\.\d+\.\d+)$'
|
BUILD_TYPE="bleeding"
|
||||||
BLEEDING_BUILD_REGEX='^(v?\d+\.\d+\.\d+-BE(?:-[^-]+)?)$'
|
elif [[ "$TAGS" =~ ^(v?\d+\.\d+\.\d+)$ ]]; then
|
||||||
if [[ "$TAG" =~ $RELEASE_BUILD_REGEX ]]; then
|
BUILD_TYPE="release"
|
||||||
BUILD_TYPE="release"
|
fi
|
||||||
break # Stop checking
|
|
||||||
elif [[ "$TAG" =~ $BLEEDING_BUILD_REGEX ]]; then
|
|
||||||
BUILD_TYPE="bleeding"
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
echo "Build type: $BUILD_TYPE"
|
echo "Build type: $BUILD_TYPE"
|
||||||
echo "::set-output name=build_type::$BUILD_TYPE"
|
echo "::set-output name=build_type::$BUILD_TYPE"
|
||||||
shell: bash
|
shell: bash
|
||||||
|
Loading…
x
Reference in New Issue
Block a user