main: detect epoch in version string
This commit is contained in:
parent
df173bea8c
commit
55eb636e24
5
main.js
5
main.js
|
@ -32,9 +32,9 @@ async function main() {
|
||||||
|
|
||||||
const file = path.join(sourceDirectory, "debian/changelog")
|
const file = path.join(sourceDirectory, "debian/changelog")
|
||||||
const changelog = await firstline(file)
|
const changelog = await firstline(file)
|
||||||
const regex = /^(?<package>.+) \((?<version>[^-]+)-?(?<revision>[^-]+)?\) (?<distribution>.+);/
|
const regex = /^(?<package>.+) \((?<epoch>[^:-]+)?:?(?<version>[^:-]+)-?(?<revision>[^:-]+)?\) (?<distribution>.+);/
|
||||||
const match = changelog.match(regex)
|
const match = changelog.match(regex)
|
||||||
const { package, version, revision, distribution } = match.groups
|
const { package, epoch, version, revision, distribution } = match.groups
|
||||||
const os = await getOS(getDistribution(distribution))
|
const os = await getOS(getDistribution(distribution))
|
||||||
const container = package
|
const container = package
|
||||||
const image = os + ":" + getDistribution(distribution)
|
const image = os + ":" + getDistribution(distribution)
|
||||||
|
@ -44,6 +44,7 @@ async function main() {
|
||||||
core.startGroup("Print details")
|
core.startGroup("Print details")
|
||||||
const details = {
|
const details = {
|
||||||
package: package,
|
package: package,
|
||||||
|
epoch: epoch,
|
||||||
version: version,
|
version: version,
|
||||||
revision: revision,
|
revision: revision,
|
||||||
distribution: getDistribution(distribution),
|
distribution: getDistribution(distribution),
|
||||||
|
|
Loading…
Reference in a new issue