Tolto before script e test per fix nuget
This commit is contained in:
+13
-4
@@ -1,19 +1,28 @@
|
||||
variables:
|
||||
NUGET_PATH: 'C:\Tools\nuget.exe'
|
||||
MSBUILD_PATH: 'C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\MSBuild\Current\Bin\MSBuild.exe'
|
||||
hasSource: '& "$env:NUGET_PATH" sources list | find "`"Steamware Nexus`"" /C'
|
||||
|
||||
|
||||
stages:
|
||||
- build
|
||||
- deploy
|
||||
|
||||
before_script:
|
||||
- '& "$env:NUGET_PATH" restore LPA.sln' # sourcecode\project.sln-This path includes project solution where is available and restoring - modifica locale per test restore
|
||||
|
||||
|
||||
build_job:
|
||||
stage: build
|
||||
script:
|
||||
- '& "\$env:MSBUILD_PATH" LPA/LPA.csproj -target:Build /p:Configuration=Release /p:Platform=\"Any CPU\" /p:OutputPath=bin/'
|
||||
- |-
|
||||
if ($env:hasSource == "0")
|
||||
{
|
||||
'& "$env:NUGET_PATH" sources Add -Name "`"Steamware Nexus`"" -Source http://nexus.steamware.net/repository/nuget-group -username "`"nugetUser`"" -password "`"viaDante16`""'
|
||||
}
|
||||
else
|
||||
{
|
||||
'& "$env:NUGET_PATH" sources Update -Name "`"Steamware Nexus`"" -Source http://nexus.steamware.net/repository/nuget-group -username "`"nugetUser`"" -password "`"viaDante16`""'
|
||||
}
|
||||
- '& "$env:NUGET_PATH" restore LPA.sln'
|
||||
- '& "\$env:MSBUILD_PATH" LPA/LPA.csproj -target:Build /p:Configuration=Release /p:Platform=\"Any CPU\" /p:OutputPath=bin/'
|
||||
|
||||
artifacts:
|
||||
expire_in: 365 days #artifcats will be stored only 365 days after this it will expire
|
||||
|
||||
Reference in New Issue
Block a user