|
400 | 400 | end |
401 | 401 | end |
402 | 402 | end |
| 403 | + |
| 404 | + context "when the dependency uses Jenkin's plugin release conventions" do |
| 405 | + # See |
| 406 | + # https://www.jenkins.io/doc/developer/publishing/releasing-cd/ |
| 407 | + # https://github.com/jenkinsci/jep/blob/master/jep/305/README.adoc |
| 408 | + |
| 409 | + context "when the version contains embedded git commits" do |
| 410 | + let(:dependency_version) { "5933.vcf06f7b_5d1a_2" } |
| 411 | + let(:comparison_version) { "5857.vb_f3dd0731f44" } |
| 412 | + it { is_expected.to be true } |
| 413 | + end |
| 414 | + |
| 415 | + context "when the version has a single embedded git commit" do |
| 416 | + let(:dependency_version) { "5622.c9c3051619f5" } |
| 417 | + let(:comparison_version) { "5681.79d2ddf61465" } |
| 418 | + it { is_expected.to be true } |
| 419 | + end |
| 420 | + |
| 421 | + context "when the version has a single embedded git commit using different delimiters" do |
| 422 | + let(:dependency_version) { "5622-c9c3051619f5" } |
| 423 | + let(:comparison_version) { "5681.79d2ddf61465" } |
| 424 | + it { is_expected.to be true } |
| 425 | + end |
| 426 | + |
| 427 | + context "when the version has a single embedded git commit with the v suffix" do |
| 428 | + # Example: https://github.com/jenkinsci/bom/releases/tag/5622.vc9c3051619f5 |
| 429 | + let(:dependency_version) { "5622.vc9c3051619f5" } |
| 430 | + let(:comparison_version) { "5681.79d2ddf61465" } |
| 431 | + it { is_expected.to be true } |
| 432 | + end |
| 433 | + |
| 434 | + context "when the version contains embedded git commit with a delimiter" do |
| 435 | + # Example: https://github.com/jenkinsci/bom/releases/tag/5701.va_b_018a_a_6b_0d3 |
| 436 | + let(:dependency_version) { "5701.va_b_018a_a_6b_0d3" } |
| 437 | + let(:comparison_version) { "5622.c9c3051619f5" } |
| 438 | + it { is_expected.to be true } |
| 439 | + end |
| 440 | + |
| 441 | + context "when the version contains embedded git commit with a delimiter and leading character" do |
| 442 | + # Example: https://github.com/jenkinsci/bom/releases/tag/5723.v6f9c6b_d1218a_ |
| 443 | + let(:dependency_version) { "5723.v6f9c6b_d1218a_" } |
| 444 | + let(:comparison_version) { "5622.c9c3051619f5" } |
| 445 | + it { is_expected.to be true } |
| 446 | + end |
| 447 | + |
| 448 | + context "when only one of the version contains embedded git commits" do |
| 449 | + let(:dependency_version) { "5933.vcf06f7b_5d1a_2" } |
| 450 | + let(:comparison_version) { "5933" } |
| 451 | + it { is_expected.to be false } |
| 452 | + end |
| 453 | + |
| 454 | + end |
403 | 455 | end |
404 | 456 | end |
405 | 457 | end |
0 commit comments