mirror of
https://github.com/sp-tarkov/build.git
synced 2025-02-13 09:50:45 -05:00
Adds server's short commit hash to file name
This commit is contained in:
parent
324fe97ec7
commit
337f82c4f7
@ -190,8 +190,11 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
container:
|
container:
|
||||||
image: refringe/spt-build-node:1.0.6
|
image: refringe/spt-build-node:1.0.6
|
||||||
|
outputs:
|
||||||
|
server_commit: ${{ steps.clone.outputs.server_commit }}
|
||||||
steps:
|
steps:
|
||||||
- name: Clone
|
- name: Clone
|
||||||
|
id: clone
|
||||||
run: |
|
run: |
|
||||||
rm -rf /workspace/refringe/Build/server
|
rm -rf /workspace/refringe/Build/server
|
||||||
if [[ "${{ needs.prepare.outputs.is_nightly }}" == "true" ]]; then
|
if [[ "${{ needs.prepare.outputs.is_nightly }}" == "true" ]]; then
|
||||||
@ -203,6 +206,7 @@ jobs:
|
|||||||
echo "Cloning tag $TAG"
|
echo "Cloning tag $TAG"
|
||||||
git clone https://dev.sp-tarkov.com/SPT-AKI/Server.git --branch "$TAG" --depth 1 /workspace/refringe/Build/server
|
git clone https://dev.sp-tarkov.com/SPT-AKI/Server.git --branch "$TAG" --depth 1 /workspace/refringe/Build/server
|
||||||
fi
|
fi
|
||||||
|
echo "::set-output name=server_commit::$(git rev-parse --short HEAD)"
|
||||||
shell: bash
|
shell: bash
|
||||||
|
|
||||||
- name: Pull LFS Files
|
- name: Pull LFS Files
|
||||||
@ -408,19 +412,20 @@ jobs:
|
|||||||
BUILD_TYPE=${{ needs.prepare.outputs.build_type }}
|
BUILD_TYPE=${{ needs.prepare.outputs.build_type }}
|
||||||
SPT_VERSION=${{ needs.prepare.outputs.spt_version }}
|
SPT_VERSION=${{ needs.prepare.outputs.spt_version }}
|
||||||
CLIENT_VERSION=${{ needs.prepare.outputs.client_version }}
|
CLIENT_VERSION=${{ needs.prepare.outputs.client_version }}
|
||||||
|
SERVER_COMMIT=${{ needs.build-server.outputs.server_commit }}
|
||||||
TARGET_TAG=${{ needs.prepare.outputs.target_tag }}
|
TARGET_TAG=${{ needs.prepare.outputs.target_tag }}
|
||||||
DATE=$(date +%Y%m%d)
|
DATE=$(date +%Y%m%d)
|
||||||
|
|
||||||
# Conditionally format the BASE_NAME based on BUILD_TYPE and if it's a nightly build
|
# Conditionally format the BASE_NAME based on BUILD_TYPE and if it's a nightly build
|
||||||
if [[ "${{ needs.prepare.outputs.is_nightly }}" == "true" ]]; then
|
if [[ "${{ needs.prepare.outputs.is_nightly }}" == "true" ]]; then
|
||||||
BASE_NAME="SPT-NIGHTLY-${SPT_VERSION}-${CLIENT_VERSION}-${DATE}"
|
BASE_NAME="SPT-NIGHTLY-${SPT_VERSION}-${CLIENT_VERSION}-${SERVER_COMMIT}-${DATE}"
|
||||||
else
|
else
|
||||||
# Make BUILD_TYPE and TARGET_TAG uppercase
|
# Make BUILD_TYPE and TARGET_TAG uppercase
|
||||||
UPPER_BUILD_TYPE=$(echo "$BUILD_TYPE" | tr '[:lower:]' '[:upper:]')
|
UPPER_BUILD_TYPE=$(echo "$BUILD_TYPE" | tr '[:lower:]' '[:upper:]')
|
||||||
UPPER_TARGET_TAG=$(echo "$TARGET_TAG" | tr '[:lower:]' '[:upper:]')
|
UPPER_TARGET_TAG=$(echo "$TARGET_TAG" | tr '[:lower:]' '[:upper:]')
|
||||||
|
|
||||||
if [ "$BUILD_TYPE" = "release" ]; then
|
if [ "$BUILD_TYPE" = "release" ]; then
|
||||||
BASE_NAME="SPT-${SPT_VERSION}-${CLIENT_VERSION}"
|
BASE_NAME="SPT-${SPT_VERSION}-${CLIENT_VERSION}-${SERVER_COMMIT}"
|
||||||
else
|
else
|
||||||
# For debug and non-nightly-bleeding builds, include either TAG_PART or DATE, but not both
|
# For debug and non-nightly-bleeding builds, include either TAG_PART or DATE, but not both
|
||||||
# Determine TAG_PART based on TARGET_TAG structure
|
# Determine TAG_PART based on TARGET_TAG structure
|
||||||
@ -432,9 +437,9 @@ jobs:
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
if [ -n "$TAG_PART" ]; then
|
if [ -n "$TAG_PART" ]; then
|
||||||
BASE_NAME="SPT-${UPPER_BUILD_TYPE}-${SPT_VERSION}-${CLIENT_VERSION}${TAG_PART}"
|
BASE_NAME="SPT-${UPPER_BUILD_TYPE}-${SPT_VERSION}-${CLIENT_VERSION}-${SERVER_COMMIT}${TAG_PART}"
|
||||||
else
|
else
|
||||||
BASE_NAME="SPT-${UPPER_BUILD_TYPE}-${SPT_VERSION}-${CLIENT_VERSION}-${DATE}"
|
BASE_NAME="SPT-${UPPER_BUILD_TYPE}-${SPT_VERSION}-${CLIENT_VERSION}-${SERVER_COMMIT}-${DATE}"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
Loading…
x
Reference in New Issue
Block a user