mirror of
https://github.com/Ellpeck/MLEM.git
synced 2024-11-22 12:58:33 +01:00
actually use criteria to skip push
This commit is contained in:
parent
044e0cd23c
commit
5b061e3c60
2 changed files with 3 additions and 4 deletions
2
Jenkinsfile
vendored
2
Jenkinsfile
vendored
|
@ -4,7 +4,7 @@ pipeline {
|
||||||
stage('Cake Build') {
|
stage('Cake Build') {
|
||||||
steps {
|
steps {
|
||||||
sh 'chmod +x ./build.sh'
|
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') {
|
stage('Document') {
|
||||||
|
|
|
@ -37,9 +37,7 @@ Task("Pack").IsDependentOn("Build").Does(() => {
|
||||||
DotNetCorePack(project.FullPath, settings);
|
DotNetCorePack(project.FullPath, settings);
|
||||||
});
|
});
|
||||||
|
|
||||||
Task("Push").IsDependentOn("Pack").Does(() => {
|
Task("Push").WithCriteria(branch == "master" || branch == "release").IsDependentOn("Pack").Does(() => {
|
||||||
if(branch != "master" && branch != "release")
|
|
||||||
return;
|
|
||||||
NuGetPushSettings settings;
|
NuGetPushSettings settings;
|
||||||
if (branch == "release") {
|
if (branch == "release") {
|
||||||
settings = new NuGetPushSettings {
|
settings = new NuGetPushSettings {
|
||||||
|
@ -62,5 +60,6 @@ Task("Document").Does(() => {
|
||||||
});
|
});
|
||||||
|
|
||||||
Task("Default").IsDependentOn("Pack");
|
Task("Default").IsDependentOn("Pack");
|
||||||
|
Task("Publish").IsDependentOn("Push");
|
||||||
|
|
||||||
RunTarget(target);
|
RunTarget(target);
|
Loading…
Reference in a new issue