diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index d3c4a56..456e30a 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -7,14 +7,21 @@ variables: NET_SHARE_Z: '\\10.74.82.201\Artifacts' NET_SHARE_S: '\\10.74.82.201\Scambio' NET_SHARE_R: '\\10.74.82.201\EgwTech' + NET_SHARE_H: '\\10.74.82.252\team drives' NET_USERQ: 'steamw\egalware' + NET_USER_SERVICES: 'steamw\services' MACH_VERS: '0.0.0.0' TEMP_PATH: 'C:\MachinesDeploy' MACHINES_PATH_R: 'R:\EgtData\Machines' DEST_MACHINES_PATH_R: 'R:\EgtData\Machines\zTestYAML' + DEST_MACHINES_PATH_H: 'H:\Beam & Wall - Essetre\test' SRC_PATH: '' BASE_PATH: '' TEST_PATH: '' + URL_VERSIONS_LOG: "https://liman.egalware.com/ELM.API/api/release/save" + MACH_VERS_NUM: '0.0.0.0' + CRITICAL_STRING: "#critical#" + #Note compilazione LUA: # lua54 -o bin\$FileName -s $FileName: -o = output, -s = NON include i debug symbols @@ -44,6 +51,22 @@ variables: SLEEP 2 net use R: /delete +# helper copia script verso drive condiviso +.ReplicaStor01: &ReplicaStor01 + - | + net use H: /delete + SLEEP 2 + net use H: $env:NET_SHARE_H /u:$env:NET_USER_SERVICES $SRVCS_PASSWD + echo "-----------------------" + echo " Copia macchina su stor01" + echo "-----------------------" + SLEEP 2 + $destinationPath = "$env:DEST_MACHINES_PATH_H\$env:MACH_NAME" + "\" + echo $destinationPath + ROBOCOPY "$env:BASE_PATH" "$destinationPath\" *.zip + SLEEP 2 + net use H: /delete + # helper copia script verso cartella di rete R:\ per develop .ReplicaR_DEV: &ReplicaR_DEV - | @@ -109,12 +132,22 @@ variables: echo "-----------------------" echo " Calcolo versione" echo "-----------------------" + + # calcolo versione formato stringa $fPath = "$env:MACH_NAME.mlde"; $vLine = Select-String -path $fPath -Pattern 'PP_VER'; $comp = $vLine -split "="; $env:MACH_VERS = $comp[1].Replace("'","").Trim() - # display versione - Write-Output $env:MACH_VERS; + # display versione formato stringa + Write-Output $env:MACH_VERS + + # calcolo versione formato numerico + $fPath = "$env:MACH_NAME.mlde"; + $vLine = Select-String -path $fPath -Pattern 'PP_NVER'; + $comp = $vLine -split "="; + $env:MACH_VERS_NUM = $comp[1].Replace("'","").Trim() + # display versione formato numerico + Write-Output $env:MACH_VERS_NUM # helper calcolo versione se develop .version-fix_DEV: &version-fix_DEV @@ -126,7 +159,7 @@ variables: $commitAuthor = $commitAuthor[0].Trim() $env:MACH_VERS = $commitAuthor # display versione - Write-Output $env:MACH_VERS; + Write-Output $env:MACH_VERS # helper creazione folders .folder-fix: &folder-fix @@ -158,6 +191,33 @@ variables: 7zip a -tzip $Target $Source Write-Output "called ZIP $Source --> $Target" +# helper invio notifica a log versioni online (LiMan) +.SendToVersionsLog: &SendToVersionsLog + - | + echo "-----------------------" + echo " Invio versione a log online" + echo "-----------------------" + $tags = "" + # se critico scrive tag + if ( $CI_COMMIT_MESSAGE | Select-String -Pattern $env:CRITICAL_STRING) { + $tags = "CRITICAL" + } + $body = + @{ + codInst = "EgalWare" + codApp = $env:MACH_NAME + uplAppId = "UpdateManager" + masterKey = $LiMan_Key + tipo = "Machine" + versNum = $env:MACH_VERS_NUM + versText = $env:MACH_VERS + releaseDate = (Get-Date).toString("yyyy-MM-ddTHH:mm:ss.fffZ") + relTags = $tags + } + $jsonBody = ConvertTo-Json -InputObject $body + echo $jsonBody + Invoke-WebRequest -Method Post -URI $env:URL_VERSIONS_LOG -ContentType "application/json" -Body $jsonBody -UseBasicParsing + # helper esecuzione test .RunTest: &RunTest @@ -186,6 +246,8 @@ LuaCompile:build: - *LuaCompile - *ZipClean - *ReplicaR + - *ReplicaStor01 + - *SendToVersionsLog LuaCompileDev:build: stage: build @@ -233,4 +295,5 @@ LuaCompileDev:build: # script: # - *LuaCompile # - *ZipClean -# - *ReplicaR \ No newline at end of file +# - *ReplicaR + diff --git a/Essetre-FAST.mlde b/Essetre-FAST.mlde index f015d40..0c40120 100644 --- a/Essetre-FAST.mlde +++ b/Essetre-FAST.mlde @@ -64,11 +64,13 @@ -- 2024/09/05 LM ver 2.6i3 In BeamData aggiunte costanti MIN_HEIGHT_ADDED_CUTS, PRECUT_HEAD, PRECUT_TAIL -- 2024/09/06 LM ver 2.6i4 In BeamData le costanti sopra sono configurabili anche da offsets Ts3v7 -- 2024/09/16 AV ver 2.6i5 Allineamento con common ver. 2.6i2 +-- 2024/09/18 LM ver 2.6i6 Modificato YAML per comunicazione versioni a LiMan. Aggiunta PP_NVER, versione in formato numerico. require( 'EmtGenerator') EgtEnableDebug( false) -PP_VER = '2.6i5' +PP_VER = '2.6i6' +PP_NVER = '2.6.9.6' MIN_MACH_VER = '2.5k1' MACH_NAME = 'Essetre-FAST'