1
0
Fork 0
mirror of https://github.com/Ellpeck/MLEM.git synced 2024-12-24 17:29:23 +01:00

actually use criteria to skip push

This commit is contained in:
Ellpeck 2020-05-22 01:44:47 +02:00
parent 044e0cd23c
commit 5b061e3c60
2 changed files with 3 additions and 4 deletions

2
Jenkinsfile vendored
View file

@ -4,7 +4,7 @@ pipeline {
stage('Cake Build') {
steps {
sh 'chmod +x ./build.sh'
sh './build.sh -Target=Push -Branch=' + env.BRANCH_NAME
sh './build.sh -Target=Publish -Branch=' + env.BRANCH_NAME
}
}
stage('Document') {

View file

@ -37,9 +37,7 @@ Task("Pack").IsDependentOn("Build").Does(() => {
DotNetCorePack(project.FullPath, settings);
});
Task("Push").IsDependentOn("Pack").Does(() => {
if(branch != "master" && branch != "release")
return;
Task("Push").WithCriteria(branch == "master" || branch == "release").IsDependentOn("Pack").Does(() => {
NuGetPushSettings settings;
if (branch == "release") {
settings = new NuGetPushSettings {
@ -62,5 +60,6 @@ Task("Document").Does(() => {
});
Task("Default").IsDependentOn("Pack");
Task("Publish").IsDependentOn("Push");
RunTarget(target);