Exemple #1
0
        private static Option <string> ResolveServiceJobId(MainArgs args)
        {
            if (args.IsProvided("--jobId"))
            {
                return(args.OptJobid);
            }
            var jobId = new EnvironmentVariables().GetEnvironmentVariable("APPVEYOR_JOB_ID");

            if (jobId.IsNotNullOrWhitespace())
            {
                return(jobId);
            }
            return(null);
        }
Exemple #2
0
        private static Option <string> ResolvePullRequestId(MainArgs args)
        {
            if (args.IsProvided("--pullRequest"))
            {
                return(args.OptPullrequest);
            }
            var prId = new EnvironmentVariables().GetEnvironmentVariable("APPVEYOR_PULL_REQUEST_NUMBER");

            if (prId.IsNotNullOrWhitespace())
            {
                return(prId);
            }
            return(null);
        }
Exemple #3
0
        private static Option <string> ResolveServiceNumber(MainArgs args)
        {
            if (args.IsProvided("--serviceNumber"))
            {
                return(args.OptServicenumber);
            }

            var jobId = new EnvironmentVariables().GetEnvironmentVariable("APPVEYOR_BUILD_NUMBER");

            if (jobId.IsNotNullOrWhitespace())
            {
                return(jobId);
            }

            return(null);
        }
Exemple #4
0
 private static Option<string> ResolveServiceJobId(MainArgs args)
 {
     if (args.IsProvided("--jobId")) return args.OptJobid;
     var jobId = new EnvironmentVariables().GetEnvironmentVariable("APPVEYOR_JOB_ID");
     if (jobId.IsNotNullOrWhitespace()) return jobId;
     return null;
 }