Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 85552ba0aa |
+71
-33
@@ -2,11 +2,10 @@ variables:
|
||||
NUGET_PATH: 'C:\Tools\nuget.exe'
|
||||
MSBUILD_PATH: 'C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\MSBuild\Current\Bin\MSBuild.exe'
|
||||
ASPNET_MERGE_PATH: 'C:\Program Files (x86)\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.8 Tools'
|
||||
NEXUS_PATH: 'SOUR'
|
||||
NEXUS_PATH: 'OPC-UA-REDIS/SOUR'
|
||||
APP_NAME: 'SOUR'
|
||||
SOL_NAME: 'SOUR'
|
||||
CONFIG: 'Release'
|
||||
VERS_MAIN: '2.0'
|
||||
VERS_MAIN: '1.2'
|
||||
NEW_REL: ''
|
||||
OUTPUT_DIR: ''
|
||||
|
||||
@@ -21,30 +20,49 @@ variables:
|
||||
}
|
||||
echo $hasSource
|
||||
|
||||
# $env:NEW_REL = $env:VERS_MAIN+"."+(get-date –format yyMM)+"."+$CI_PIPELINE_IID
|
||||
# helper x fix version number
|
||||
.version-fix: &version-fix
|
||||
- |
|
||||
$env:NEW_REL = $env:VERS_MAIN+"."+(get-date –format yyMM)+"."+(get-date –format dHH)
|
||||
$contenuto = Get-Content -path 'src\SharedAssemblyInfo.cs' -Raw
|
||||
$newContenuto = $contenuto -replace '1.0.0.0', $env:NEW_REL
|
||||
$newContenuto | Set-Content -Path 'src\SharedAssemblyInfo.cs'
|
||||
$env:NEW_REL = $env:VERS_MAIN+"."+(get-date –format yyMM)+"."+$CI_PIPELINE_IID
|
||||
$contenuto = Get-Content -path 'VersGen\VersGen.cs' -Raw
|
||||
$newContenuto = $contenuto -replace '0.0.0.0', $env:NEW_REL
|
||||
$newContenuto | Set-Content -Path 'VersGen\VersGen.cs'
|
||||
echo "Set vers: $env:NEW_REL"
|
||||
if($CI_COMMIT_BRANCH = "develop")
|
||||
|
||||
# helper pulizia files zip
|
||||
.cleanup-zip: &cleanup-zip
|
||||
- |
|
||||
$env:OUTPUT_DIR = "Releases\" + $CI_COMMIT_BRANCH + "\*"
|
||||
if ((Test-Path $env:OUTPUT_DIR))
|
||||
{
|
||||
$env:CONFIG = "Debug"
|
||||
Remove-Item $env:OUTPUT_DIR -Force -Recurse -ErrorAction Ignore
|
||||
}
|
||||
echo "Clening ZIP dir: $env:OUTPUT_DIR"
|
||||
|
||||
# helper creazione files zip
|
||||
.zipper: &zipper
|
||||
- |
|
||||
$7zipPath = $env:ProgramFiles+"\7-Zip\7z.exe"
|
||||
if (-not (Test-Path -Path $7zipPath -PathType Leaf)) {
|
||||
throw "7 zip file '$7zipPath' not found"
|
||||
}
|
||||
Set-Alias 7zip $7zipPath
|
||||
$Target = "Releases\" + $CI_COMMIT_BRANCH + "\" + $env:APP_NAME + ".zip"
|
||||
$Source = "$env:APP_NAME\bin\*"
|
||||
7zip a -tzip $Target $Source
|
||||
echo "called ZIP $Source --> $Target"
|
||||
|
||||
# helper creazione hash files
|
||||
.hashBuild: &hashBuild
|
||||
- |
|
||||
$Target = "src\SOUR.Setup\bin\SOUR.msi"
|
||||
$Target = "Releases\" + $CI_COMMIT_BRANCH + "\" + $env:APP_NAME + ".zip"
|
||||
$MD5 = Get-FileHash $Target -Algorithm MD5
|
||||
$SHA1 = Get-FileHash $Target -Algorithm SHA1
|
||||
New-Item $Target".md5"
|
||||
New-Item $Target".sha1"
|
||||
$MD5.Hash | Set-Content -Path $Target".md5"
|
||||
$SHA1.Hash | Set-Content -Path $Target".sha1"
|
||||
|
||||
echo "Created HASH files for $Target"
|
||||
|
||||
# helper x send su NEXUS
|
||||
@@ -55,8 +73,13 @@ variables:
|
||||
$currentTime = get-date -format ddHH;
|
||||
$VersNumb = $env:NEW_REL
|
||||
echo "Curr Version: $VersNumb"
|
||||
$FileMsi="src\SOUR.Setup\bin\SOUR.msi"
|
||||
$FileName="SOUR.msi"
|
||||
$FileManIn="VersGen\manifest.xml"
|
||||
$FileManOut=$env:APP_NAME +"\Resources\manifest.xml"
|
||||
$FileCLogIn="VersGen\ChangeLog.html"
|
||||
$FileCLogOut=$env:APP_NAME +"\Resources\ChangeLog.html"
|
||||
echo "Manifest path: $FileManOut"
|
||||
echo "ChangeLog path: $FileCLogOut"
|
||||
|
||||
if($CI_COMMIT_BRANCH -eq "master")
|
||||
{
|
||||
$version = "stable"
|
||||
@@ -65,7 +88,16 @@ variables:
|
||||
{
|
||||
$version = "unstable"
|
||||
}
|
||||
$File2Send = Get-ChildItem("src\SOUR.Setup\bin\*")
|
||||
$manData = Get-Content $FileManIn
|
||||
$manData = $manData -replace "1.0.0.0", $VersNumb
|
||||
$manData = $manData -replace "{{DIRNAME}}", $env:NEXUS_PATH
|
||||
$manData = $manData -replace "{{BRANCHNAME}}", "$version/LAST"
|
||||
$manData = $manData -replace "{{PACKNAME}}", $env:APP_NAME
|
||||
Set-Content -Path $FileManOut -Value $manData
|
||||
$clogData = Get-Content $FileCLogIn
|
||||
$clogData = $clogData -replace "{{CURRENT-REL}}", $VersNumb
|
||||
Set-Content -Path $FileCLogOut -Value $clogData
|
||||
$File2Send = Get-ChildItem("Releases\$CI_COMMIT_BRANCH\*")
|
||||
ForEach ($File in $File2Send) {
|
||||
$FileName = Split-Path $File -leaf
|
||||
echo "mCurl -s -u GitLab:$NEXUS_PASSWD --upload-file $File https://nexus.steamware.net/repository/SWS/$env:NEXUS_PATH/$version/LAST/$FileName"
|
||||
@@ -73,43 +105,49 @@ variables:
|
||||
echo "mCurl -s -u GitLab:$NEXUS_PASSWD --upload-file $File https://nexus.steamware.net/repository/SWS/$env:NEXUS_PATH/$version/ARCHIVE/$VersNumb/$FileName"
|
||||
mCurl -s -u GitLab:$NEXUS_PASSWD --upload-file $File https://nexus.steamware.net/repository/SWS/$env:NEXUS_PATH/$version/ARCHIVE/$VersNumb/$FileName
|
||||
}
|
||||
echo "mCurl -s -u GitLab:$NEXUS_PASSWD --upload-file $FileManOut https://nexus.steamware.net/repository/SWS/$env:NEXUS_PATH/$version/LAST/manifest.xml"
|
||||
mCurl -s -u GitLab:$NEXUS_PASSWD --upload-file $FileManOut https://nexus.steamware.net/repository/SWS/$env:NEXUS_PATH/$version/LAST/manifest.xml
|
||||
echo "mCurl -s -u GitLab:$NEXUS_PASSWD --upload-file $FileCLogOut https://nexus.steamware.net/repository/SWS/$env:NEXUS_PATH/$version/LAST/ChangeLog.html"
|
||||
mCurl -s -u GitLab:$NEXUS_PASSWD --upload-file $FileCLogOut https://nexus.steamware.net/repository/SWS/$env:NEXUS_PATH/$version/LAST/ChangeLog.html
|
||||
|
||||
# echo "mCurl -s -u GitLab:$NEXUS_PASSWD --upload-file $FileMsi https://repository.scmgroup.com/repository/mconnect-raw/SOUR.msi"
|
||||
# mCurl -s -u GitLab:$NEXUS_PASSWD --upload-file $FileMsi https://repository.scmgroup.com/repository/mconnect-raw/SOUR.msil
|
||||
# $File2Send = "Releases\" + $CI_COMMIT_BRANCH + "\" + $env:APP_NAME + ".zip"
|
||||
# mCurl -v -u GitLab:$NEXUS_PASSWD --upload-file $File2Send https://nexus.steamware.net/repository/SWS/$env:NEXUS_PATH/$CI_COMMIT_BRANCH/LAST/$env:APP_NAME-$version.zip
|
||||
# mCurl -v -u GitLab:$NEXUS_PASSWD --upload-file $File2Send https://nexus.steamware.net/repository/SWS/$env:NEXUS_PATH/$CI_COMMIT_BRANCH/ARCHIVE/$VersNumb/$env:APP_NAME-$version.zip
|
||||
# mCurl -v -u GitLab:$NEXUS_PASSWD --upload-file $File2Send".md5" https://nexus.steamware.net/repository/SWS/$env:NEXUS_PATH/$version/$env:APP_NAME-$version.zip".md5
|
||||
# mCurl -v -u GitLab:$NEXUS_PASSWD --upload-file $File2Send".sha1" https://nexus.steamware.net/repository/SWS/$env:NEXUS_PATH/$version/$env:APP_NAME-$version.zip".sha1"
|
||||
|
||||
|
||||
# mCurl -v -u $env:NEXUS_USER:$env:NEXUS_PASSWD --upload-file bin/release/$env:APP_NAME.zip $env:NEXUS_SERVER/utility/$env:NEXUS_PATH/$version/$env:APP_NAME-$version.zip
|
||||
|
||||
stages:
|
||||
- build
|
||||
- release
|
||||
- deploy
|
||||
|
||||
SOUR:Build:
|
||||
PUB:Build:
|
||||
stage: build
|
||||
tags:
|
||||
- win
|
||||
#variables:
|
||||
# - APP_NAME: 'PUB'
|
||||
before_script:
|
||||
- *nuget-fix
|
||||
- '& "$env:NUGET_PATH" restore "src\$env:SOL_NAME.sln"' # path alla solution corrente
|
||||
- '& "$env:NUGET_PATH" restore $env:SOL_NAME.sln' # path alla solution corrente
|
||||
- *version-fix
|
||||
script:
|
||||
- '& "$env:MSBUILD_PATH" "src\$env:APP_NAME\$env:APP_NAME.csproj" -target:Build /p:Configuration=$env:CONFIG /p:Platform="x86" /p:OutputPath=bin/ /verbosity:minimal /m'
|
||||
- '& "$env:MSBUILD_PATH" src\$env:APP_NAME\$env:APP_NAME.csproj -target:Build /p:Configuration=Release /p:Platform="Any CPU" /p:OutputPath=bin/ /verbosity:minimal /m'
|
||||
|
||||
SOUR:Release:
|
||||
stage: release
|
||||
PUB:Deploy:
|
||||
stage: deploy
|
||||
tags:
|
||||
- win
|
||||
only:
|
||||
refs:
|
||||
- develop
|
||||
- main
|
||||
- master
|
||||
before_script:
|
||||
- *nuget-fix
|
||||
- '& "$env:NUGET_PATH" restore "src\$env:SOL_NAME.sln"' # path alla solution corrente
|
||||
- '& "$env:NUGET_PATH" restore $env:SOL_NAME.sln' # path alla solution corrente
|
||||
- *version-fix
|
||||
- *cleanup-zip
|
||||
script:
|
||||
# compilo programma
|
||||
- '& "$env:MSBUILD_PATH" "src\$env:APP_NAME\$env:APP_NAME.csproj" -target:Build /p:Configuration=$env:CONFIG /p:Platform="x86" /p:OutputPath=bin/ /verbosity:minimal /m'
|
||||
# creo installer msi
|
||||
- '& "$env:MSBUILD_PATH" src\SOUR.Setup\SOUR.Setup.wixproj /p:Configuration=$env:CONFIG /p:Platform="x86" /p:ProdVersion=$env:NEW_REL /p:OutputPath=bin/ /verbosity:minimal /m'
|
||||
- '& "$env:MSBUILD_PATH" src\$env:APP_NAME\$env:APP_NAME.csproj -target:Build /p:Configuration=Release /p:Platform="Any CPU" /p:OutputPath=bin/ /verbosity:minimal /m'
|
||||
- *zipper
|
||||
- *hashBuild
|
||||
- *nexusUpload
|
||||
needs: ["SOUR:Build"]
|
||||
needs: ["PUB:Build"]
|
||||
@@ -9,7 +9,7 @@
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>OpcUaCommon</RootNamespace>
|
||||
<AssemblyName>OpcUaCommon</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
|
||||
<TargetFrameworkVersion>v4.6.2</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<NuGetPackageImportStamp>
|
||||
</NuGetPackageImportStamp>
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
<OutputType>Exe</OutputType>
|
||||
<RootNamespace>OpcUaServer.Server</RootNamespace>
|
||||
<AssemblyName>OpcUaServer.Server</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
|
||||
<TargetFrameworkVersion>v4.6.2</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
|
||||
<NuGetPackageImportStamp>
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>SOUR.Core</RootNamespace>
|
||||
<AssemblyName>SOUR.Core</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
|
||||
<TargetFrameworkVersion>v4.6.2</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
|
||||
@@ -0,0 +1,44 @@
|
||||
<body>
|
||||
<i>Server gestione Scehde di Collaudo</i>
|
||||
<h4>Versione: {{CURRENT-REL}}</h4>
|
||||
<br />
|
||||
Note di rilascio:
|
||||
<ul>
|
||||
<li>
|
||||
<b>Ultime modifiche:</b>
|
||||
<ul>{{LAST-CHANGES}}</ul>
|
||||
</li>
|
||||
<li>
|
||||
<b>v.3.1.* →</b>
|
||||
<ul>
|
||||
<li>Revisione ruoli</li>
|
||||
<li>Gestione fasi con revisione e congelamento fasi</li>
|
||||
<li>Nuovi elementi schede di collaudo</li>
|
||||
<li>Implementazione sistema traduzione in campi schede/misure/parametri</li>
|
||||
<li>Sistemi supporto traduzione/visualizzazione in lingua</li>
|
||||
<li>Nuovi reports</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>
|
||||
<b>v.2.* →</b>
|
||||
<ul>
|
||||
<li>Implementazione modifiche per gestione in CMS</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>
|
||||
<b>v.1.* →</b>
|
||||
<ul>
|
||||
<li>Implementazione iniziale con gestione standard Ms AX + ISO9000 e succ</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
<div>
|
||||
<div style="float: left;">
|
||||
<img src="logoSteamware.png" />
|
||||
</div>
|
||||
<div style="float: right;">
|
||||
<a href="https://www.steamware.net/IOT" target="_blank">© Steamware 2006-2018</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 3.3 KiB |
@@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<item>
|
||||
<version>1.0.0.0</version>
|
||||
<url>http://seriate.steamware.net:8083/SWS/CMS_SC/{{PACKNAME}}/{{BRANCHNAME}}/{{PACKNAME}}.zip</url>
|
||||
<changelog>http://seriate.steamware.net:8083/SWS/CMS_SC/{{PACKNAME}}/{{BRANCHNAME}}/ChangeLog.html</changelog>
|
||||
<mandatory>false</mandatory>
|
||||
</item>
|
||||
@@ -9,7 +9,7 @@
|
||||
<OutputType>Exe</OutputType>
|
||||
<RootNamespace>SOUR</RootNamespace>
|
||||
<AssemblyName>SOUR</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
|
||||
<TargetFrameworkVersion>v4.6.2</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
|
||||
<NuGetPackageImportStamp>
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
<OutputType>WinExe</OutputType>
|
||||
<RootNamespace>TestApp</RootNamespace>
|
||||
<AssemblyName>TestApp</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
|
||||
<TargetFrameworkVersion>v4.6.2</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
|
||||
<Deterministic>true</Deterministic>
|
||||
|
||||
Reference in New Issue
Block a user