diff --git a/main.js b/main.js index a6602a7..3f3d966 100644 --- a/main.js +++ b/main.js @@ -13,10 +13,10 @@ async function main() { const file = path.join(directoryRunner, "debian/changelog") const changelog = await firstline(file) - const regex = /^(?.+) \((?.+)\) (?.+); (?.+)$/ + const regex = /^(?.+) \((?.+)-(?.+)\) (?.+); (?.+)$/ const match = changelog.match(regex) - const { package, version, distribution } = match.groups - const container = package + "_" + version + const { package, version, revision, distribution } = match.groups + const container = package + "_" + version + "-" + revision const image = os + ":" + distribution.replace("UNRELEASED", "unstable") core.startGroup("Create container") @@ -38,6 +38,19 @@ async function main() { ]) core.endGroup() + core.startGroup("Create tarball") + await exec.exec("docker", [ + "exec", + container, + "tar", + "--exclude-vcs", + "--exclude", "./debian", + "--transform", `s/^\./${package}-${version}/`, + "-cvzf", `../${package}_${version}.orig.tar.gz`, + "./" + ]) + core.endGroup() + core.startGroup("Update packages list") await exec.exec("docker", [ "exec",