main: create tarball
This commit is contained in:
parent
9feac88483
commit
3562c66159
19
main.js
19
main.js
|
@ -13,10 +13,10 @@ async function main() {
|
||||||
|
|
||||||
const file = path.join(directoryRunner, "debian/changelog")
|
const file = path.join(directoryRunner, "debian/changelog")
|
||||||
const changelog = await firstline(file)
|
const changelog = await firstline(file)
|
||||||
const regex = /^(?<package>.+) \((?<version>.+)\) (?<distribution>.+); (?<options>.+)$/
|
const regex = /^(?<package>.+) \((?<version>.+)-(?<revision>.+)\) (?<distribution>.+); (?<options>.+)$/
|
||||||
const match = changelog.match(regex)
|
const match = changelog.match(regex)
|
||||||
const { package, version, distribution } = match.groups
|
const { package, version, revision, distribution } = match.groups
|
||||||
const container = package + "_" + version
|
const container = package + "_" + version + "-" + revision
|
||||||
const image = os + ":" + distribution.replace("UNRELEASED", "unstable")
|
const image = os + ":" + distribution.replace("UNRELEASED", "unstable")
|
||||||
|
|
||||||
core.startGroup("Create container")
|
core.startGroup("Create container")
|
||||||
|
@ -38,6 +38,19 @@ async function main() {
|
||||||
])
|
])
|
||||||
core.endGroup()
|
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")
|
core.startGroup("Update packages list")
|
||||||
await exec.exec("docker", [
|
await exec.exec("docker", [
|
||||||
"exec",
|
"exec",
|
||||||
|
|
Loading…
Reference in a new issue