mirror of
https://github.com/azaion/annotations.git
synced 2026-04-22 21:46:30 +00:00
gdrive update
zip update
This commit is contained in:
+12
-20
@@ -48,7 +48,7 @@ pipeline {
|
||||
// Define the expected artifact patterns relative to the current directory (MAIN_BUILD_ARTIFACTS_DIR)
|
||||
def exePattern = 'AzaionSuite*.exe'
|
||||
def binPattern = 'AzaionSuite*.bin'
|
||||
// Define defaultVersion here, as it's used within the bat script
|
||||
// Define defaultVersion here, as it's used within the bat script if no exe is found
|
||||
def defaultVersion = '1.0.0'
|
||||
|
||||
|
||||
@@ -85,31 +85,22 @@ pipeline {
|
||||
echo Found !file_count! file(s) to archive.
|
||||
|
||||
|
||||
rem --- Version Extraction (only from .exe if present) ---
|
||||
set "VERSION=%DEFAULT_VERSION%"
|
||||
rem --- Determine Base Filename for Zip ---
|
||||
set "ZIP_BASE_FILENAME="
|
||||
if defined EXE_FILE (
|
||||
echo Attempting to extract version from "%EXE_FILE%"...
|
||||
rem Extract filename from full path
|
||||
for %%I in ("%EXE_FILE%") do set "EXE_FILENAME=%%~nxI"
|
||||
rem Extract part after AzaionSuite and before .exe
|
||||
rem Assumes format AzaionSuite<version>.exe
|
||||
set "TEMP_VERSION=!EXE_FILENAME:AzaionSuite=!"
|
||||
set "VERSION=!TEMP_VERSION:.exe=!"
|
||||
rem Basic check if extraction was successful
|
||||
if "!VERSION!" == "!TEMP_VERSION!" (
|
||||
echo Warning: Could not extract version from "%EXE_FILENAME%". Using default: %VERSION%
|
||||
set "VERSION=%DEFAULT_VERSION%"
|
||||
) else (
|
||||
echo Found version for archive: %VERSION%
|
||||
)
|
||||
echo Using executable filename as base for archive name: "%EXE_FILE%"...
|
||||
rem Extract filename without extension from full path
|
||||
for %%I in ("%EXE_FILE%") do set "ZIP_BASE_FILENAME=%%~nI"
|
||||
echo Extracted base filename: !ZIP_BASE_FILENAME!
|
||||
) else (
|
||||
echo Warning: No executable found to extract version for archive. Using default: %VERSION%
|
||||
echo Warning: No executable found. Using default base filename: AzaionSuite.!DEFAULT_VERSION!
|
||||
set "ZIP_BASE_FILENAME=AzaionSuite.!DEFAULT_VERSION!"
|
||||
)
|
||||
|
||||
|
||||
rem --- Zipping Logic ---
|
||||
|
||||
rem Get current date and time inMMDD-HHmmss format using wmic
|
||||
rem Get current date and time in YYYYMMDD-HHmmss format using wmic
|
||||
rem wmic output format is LocalDateTime=YYYYMMDDHHMMSS.milliseconds+UTCoffset
|
||||
for /f "tokens=2 delims==" %%a in ('wmic os get localdatetime /value') do set "dt=%%a"
|
||||
set "YYYY=%dt:~0,4%"
|
||||
@@ -120,7 +111,8 @@ pipeline {
|
||||
set "SS=%dt:~12,2%"
|
||||
set "timestamp=%YYYY%%MM%%DD%-%HH%%mm%%SS%"
|
||||
|
||||
set "ZIP_FILENAME=AzaionSuite.%VERSION%-%timestamp%.zip"
|
||||
rem Construct the final zip filename using the base filename and timestamp
|
||||
set "ZIP_FILENAME=!ZIP_BASE_FILENAME!.%timestamp%.zip"
|
||||
|
||||
echo Creating zip archive: %ZIP_FILENAME% using 7-Zip.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user