fix bugs, fix jenkinsfile, nuget mysteriously now cooperating

This commit is contained in:
Adam R Grey 2022-12-14 18:02:14 -05:00
parent e4a4173bd4
commit ddb74a7bee
2 changed files with 17 additions and 8 deletions

19
Jenkinsfile vendored
View File

@ -4,12 +4,21 @@ pipeline {
dotnetsdk 'dotnet6'
}
stages {
stage('Build') {
stage('clean old'){
steps{
dotnetClean
echo 'Building..'
sh 'dotnet publish --configuration Release --output PUBLISH-linux --os linux'
sh 'dotnet publish --configuration Release --output PUBLISH-windows --os windows'
sh 'rm -rf bin obj'
}
}
stage('linux') {
steps {
sh 'dotnet publish --configuration Release --os linux'
archiveArtifacts artifacts: 'bin/Release/net/net6.0/linux-x64/publish/*'
}
}
stage('windows') {
steps {
sh 'dotnet publish --configuration Release --os windows'
archiveArtifacts artifacts: 'bin/Release/net/net6.0/windows-x64/publish/*'
}
}
}

View File

@ -34,10 +34,10 @@ namespace directors_assistant
Console.WriteLine($"executing {cmd.name}{(ec.args != null ? ", given args " + string.Join(' ', ec.args) : "")} with timeout {ec.timeout}");
var cmdAndArgs = cmd.shell.Split(' ');
var justArgs = cmdAndArgs.Skip(1).ToList();
if(ec.args?.Count > 0)
var justArgs = string.Join(' ', cmdAndArgs.Skip(1).ToList());
if(!string.IsNullOrWhiteSpace(ec.args))
{
justArgs.AddRange(ec.args);
justArgs += ec.args;
}
var commandPath = cmdAndArgs[0];
var commandArguments = String.Join(' ', justArgs);