136 lines
4.5 KiB
YAML
136 lines
4.5 KiB
YAML
variables:
|
|
VERS_MAIN: '1.2'
|
|
NEW_REL: ''
|
|
NUM_REL: '0.1.2'
|
|
NUM_DEB: '0.1.2-beta'
|
|
NU_TYPE: 'Debug'
|
|
APP_NAME: 'WebGl-Visualizer'
|
|
NEW_COPYRIGHT: 'EgalWare 2022+'
|
|
JSON_FILE: ''
|
|
JSON_FILE_RAW: ''
|
|
NET_SHARE_X: '\\iis01\Test3D'
|
|
NET_USERQ: 'steamw\egalware'
|
|
SRC_PATH: 'TestArea_IIS01\'
|
|
# valutare se elenco --> ciclo https://docs.gitlab.com/ee/ci/variables/#store-multiple-values-in-one-variable
|
|
DIR_PATH: 'TJSD THREEJS_DOORS'
|
|
|
|
# helper (anchors, vedere https://docs.gitlab.com/ee/ci/yaml/yaml_optimization.html) x fix vers number
|
|
.version-fix: &version-fix
|
|
- |
|
|
$env:NEW_REL = $env:VERS_MAIN+"."+(get-date -format yyMM) + (get-date -format ddHH)
|
|
Write-Output $env:NEW_REL;
|
|
$env:NUM_REL = $env:VERS_MAIN+"."+(get-date -format yyMM) + (get-date -format dHH)
|
|
$env:NUM_DEB = $env:VERS_MAIN+"."+(get-date -format yyMMdd)+"-beta."+(get-date -format HHmm)
|
|
$env:NEW_COPYRIGHT = "EgalWare @ 2022-" + (get-date -format yyyy)
|
|
# display versioni generate
|
|
$resoconto = "Effettuato calcolo versioni | release v: " + $env:NUM_REL + " | debug v: " + $env:NUM_DEB;
|
|
Write-Output $resoconto;
|
|
echo "VersionFix done"
|
|
|
|
# helper copia area test 3D verso cartella di rete X:\ (IIS01) delle cartelle della TestArea_IIS01
|
|
.ReplicaX: &ReplicaX
|
|
- |
|
|
net use X: /delete
|
|
SLEEP 2
|
|
#$mountCmd = "net use X: $env:NET_SHARE_X /u:$env:NET_USERQ $SDRIVE_PASSWD"
|
|
#Write-Output $mountCmd;
|
|
net use X: $env:NET_SHARE_X /u:$env:NET_USERQ $SDRIVE_PASSWD
|
|
Foreach ($sDir in ($env:DIR_PATH -split " ")) {
|
|
#Write-Output "ROBOCOPY /MIR $env:SRC_PATH\$sDir\ X:\$sDir\"
|
|
ROBOCOPY /MIR $env:SRC_PATH\$sDir\ X:\$sDir\
|
|
}
|
|
SLEEP 2
|
|
net use X: /delete
|
|
|
|
image:
|
|
node:latest
|
|
|
|
stages:
|
|
- build
|
|
- release
|
|
|
|
# ---------- Upload Debug/Unstable ----------
|
|
WebGl.Icarus:deploy:
|
|
stage: build
|
|
variables:
|
|
APP_NAME: WebGl-Visualizer
|
|
only:
|
|
- develop
|
|
tags:
|
|
- win
|
|
before_script:
|
|
- *version-fix
|
|
- *ReplicaX
|
|
script:
|
|
- cd .\IcarusView\src\
|
|
- Set-Content -Path "./.npmrc" -Value "email=ceo@steamware.net `nalways-auth=true `n//nexus.steamware.net/repository/npm-hosted/:_authToken=$NPM_TOKEN"
|
|
- $JSON_FILE = Get-Content '.\package.json' -raw
|
|
- $JSON_FILE_RAW = $JSON_FILE | ConvertFrom-Json
|
|
- $JSON_FILE_RAW.version="$env:NUM_DEB"
|
|
- $JSON_FILE_RAW | ConvertTo-Json -depth 32| set-content '.\package.json'
|
|
- echo "//nexus.steamware.net/repository/npm-hosted/:_authToken=$NPM_TOKEN"
|
|
- npm publish
|
|
|
|
WebGl.Door:deploy:
|
|
stage: build
|
|
variables:
|
|
APP_NAME: WebGl-Door-Visualizer
|
|
only:
|
|
- develop
|
|
tags:
|
|
- win
|
|
before_script:
|
|
- *version-fix
|
|
- *ReplicaX
|
|
script:
|
|
- cd .\WebDoorView\src\
|
|
- Set-Content -Path "./.npmrc" -Value "email=ceo@steamware.net `nalways-auth=true `n//nexus.steamware.net/repository/npm-hosted/:_authToken=$NPM_TOKEN"
|
|
- $JSON_FILE = Get-Content '.\package.json' -raw
|
|
- $JSON_FILE_RAW = $JSON_FILE | ConvertFrom-Json
|
|
- $JSON_FILE_RAW.version="$env:NUM_DEB"
|
|
- $JSON_FILE_RAW | ConvertTo-Json -depth 32| set-content '.\package.json'
|
|
- echo "//nexus.steamware.net/repository/npm-hosted/:_authToken=$NPM_TOKEN"
|
|
- npm publish
|
|
|
|
# ---------- RELEASE ----------
|
|
WebGl3D.Icarus:release:
|
|
stage: release
|
|
variables:
|
|
APP_NAME: WebGl-Visualizer
|
|
only:
|
|
- main
|
|
tags:
|
|
- win
|
|
before_script:
|
|
- *version-fix
|
|
- *ReplicaX
|
|
script:
|
|
- cd .\IcarusView\src\
|
|
- Set-Content -Path "./.npmrc" -Value "email=ceo@steamware.net `nalways-auth=true `n//nexus.steamware.net/repository/npm-hosted/:_authToken=$NPM_TOKEN"
|
|
- $JSON_FILE = Get-Content '.\package.json' -raw
|
|
- $JSON_FILE_RAW = $JSON_FILE | ConvertFrom-Json
|
|
- $JSON_FILE_RAW.version="$env:NEW_REL"
|
|
- $JSON_FILE_RAW | ConvertTo-Json -depth 32| set-content '.\package.json'
|
|
- echo "//nexus.steamware.net/repository/npm-hosted/:_authToken=$NPM_TOKEN"
|
|
- npm publish
|
|
|
|
WebGl3D.Door:release:
|
|
stage: release
|
|
variables:
|
|
APP_NAME: WebGl-Door-Visualizer
|
|
only:
|
|
- main
|
|
tags:
|
|
- win
|
|
before_script:
|
|
- *version-fix
|
|
- *ReplicaX
|
|
script:
|
|
- cd .\WebDoorView\src\
|
|
- Set-Content -Path "./.npmrc" -Value "email=ceo@steamware.net `nalways-auth=true `n//nexus.steamware.net/repository/npm-hosted/:_authToken=$NPM_TOKEN"
|
|
- $JSON_FILE = Get-Content '.\package.json' -raw
|
|
- $JSON_FILE_RAW = $JSON_FILE | ConvertFrom-Json
|
|
- $JSON_FILE_RAW.version="$env:NEW_REL"
|
|
- $JSON_FILE_RAW | ConvertTo-Json -depth 32| set-content '.\package.json'
|
|
- echo "//nexus.steamware.net/repository/npm-hosted/:_authToken=$NPM_TOKEN"
|
|
- npm publish |