From e7e71ef4c110a6a2740c6297516e6a6603960552 Mon Sep 17 00:00:00 2001 From: loop <126372784+tribes2@users.noreply.github.com> Date: Mon, 20 Oct 2025 15:56:33 +0100 Subject: [PATCH] add automation for tasks I'm already forgetting about, add version --- .github/workflows/skillsector.yml | 13 ++++++++----- scripts/SkillSectorGame.cs | 1 + 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/.github/workflows/skillsector.yml b/.github/workflows/skillsector.yml index 8ee36e3..3c1124c 100644 --- a/.github/workflows/skillsector.yml +++ b/.github/workflows/skillsector.yml @@ -14,11 +14,14 @@ jobs: steps: - name: Checkout repository code uses: actions/checkout@v4 - # - name: Update DMP2::Version script to match GitHub tag - # run: | - # VERSION_FILE='scripts/autoexec/dmp2VersionCheck.cs' - # NEW_VERSION="\"${{ github.ref_name }}\"" - # sed -i "s/\(\$DMP2::Version = \)[^;]*;/\1${NEW_VERSION};/" "$VERSION_FILE" + - name: Disable development mode when creating a release + run: | + sed -i "s/DEVMODE.*=.*1;/DEVMODE = 0" scripts/SkillSectorGame.cs + - name: Update SkillSector version to match GitHub tag + run: | + VERSION_FILE='scripts/SkillSectorGame.cs' + NEW_VERSION="\"${{ github.ref_name }}\"" + sed -i "s/\(\$SkillSector::Version = \)[^;]*;/\1${NEW_VERSION};/" "$VERSION_FILE" - name: Build and release a vl2 using the vl2-builder action id: 'release' uses: tribes2/vl2-builder@v2.0 diff --git a/scripts/SkillSectorGame.cs b/scripts/SkillSectorGame.cs index 76fdb61..0a0487d 100644 --- a/scripts/SkillSectorGame.cs +++ b/scripts/SkillSectorGame.cs @@ -7,6 +7,7 @@ // Allows you to modify AimTrain placeholder entities. // Leave it on when editing the map, leave it off when playing the game. $DEVMODE = 1; +$SkillSector::Version = "DEV"; // Load the various modes, datablocks and functions. exec("scripts/SkillSectorTeleporter.cs");