Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support git hash in [nexus] SNAPSHOT version #6369

Merged
merged 2 commits into from
Apr 9, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion services/nexus/nexus-version.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
'use strict'

function isSnapshotVersion(version) {
const pattern = /(\d+\.)*\d-SNAPSHOT/
const pattern = /(\d+\.)*[0-9a-f]-SNAPSHOT/
return version && version.match(pattern)
}

Expand Down
16 changes: 16 additions & 0 deletions services/nexus/nexus.tester.js
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,22 @@ t.create('Nexus 2 - snapshot version with + in version')
message: isVersion,
})

t.create('Nexus 2 - snapshot version with + and hex hash in version')
.get(
'/s/com.typesafe.akka/akka-stream-kafka_2.13.json?server=https://repository.jboss.org/nexus'
)
.intercept(nock =>
nock('https://repository.jboss.org/nexus')
.get('/service/local/lucene/search')
.query({ g: 'com.typesafe.akka', a: 'akka-stream-kafka_2.13' })
.reply(200, { data: [{ version: '2.1.0-M1+58-f25047fc-SNAPSHOT' }] })
)
.expectBadge({
label: 'nexus',
color: 'orange',
message: isVersion,
})

t.create('Nexus 2 - search snapshot version not in latestSnapshot')
.get(
'/s/com.progress.fuse/fusehq.json?server=https://repository.jboss.org/nexus'
Expand Down