Skip to content
Snippets Groups Projects
Commit 7e9ae1c8 authored by Simon McVittie's avatar Simon McVittie
Browse files

Reorder artifact filenames to group related files better

parent 6dc63ef3
No related branches found
No related tags found
No related merge requests found
......@@ -8,8 +8,8 @@
{{- $keyring := or .keyring "" -}}
{{- $keyringpackage := or .keyringpackage "" -}}
{{- $version := or .version "0" -}}
{{- $ospack := or .ospack (printf "base_%s_%s_%s.tar.gz" $suite $version $architecture) -}}
{{- $manifest_prefix := or .manifest_prefix (printf "base_%s_%s_%s" $suite $version $architecture) -}}
{{- $artifact_prefix := or .artifact_prefix (printf "base-%s-%s-%s" $suite $version $architecture) -}}
{{- $ospack := or .ospack (printf "%s.tar.gz" $artifact_prefix) -}}
architecture: {{ $architecture }}
......@@ -110,9 +110,9 @@ actions:
chroot: false
command: |
"$RECIPEDIR/write-manifest" "$ROOTDIR"
cp "$ROOTDIR/usr/manifest.dpkg" "$ARTIFACTDIR/{{ $manifest_prefix }}.manifest.dpkg"
cp "$ROOTDIR/usr/manifest.dpkg.built-using" "$ARTIFACTDIR/{{ $manifest_prefix }}.manifest.dpkg.built-using"
cp "$ROOTDIR/usr/manifest.deb822.gz" "$ARTIFACTDIR/{{ $manifest_prefix }}.manifest.deb822.gz"
cp "$ROOTDIR/usr/manifest.dpkg" "$ARTIFACTDIR/{{ $artifact_prefix }}.manifest.dpkg"
cp "$ROOTDIR/usr/manifest.dpkg.built-using" "$ARTIFACTDIR/{{ $artifact_prefix }}.manifest.dpkg.built-using"
cp "$ROOTDIR/usr/manifest.deb822.gz" "$ARTIFACTDIR/{{ $artifact_prefix }}.manifest.deb822.gz"
# No point in archiving these
- action: run
......
......@@ -13,13 +13,14 @@
{{- $ospack := or .ospack (printf "base_%s_%s_%s.tar.gz" $suite $version $architecture) -}}
{{- $runtime := .runtime -}}
{{- $runtime_branch := or .runtime_branch "master" -}}
{{- $sysroot_prefix := or .sysroot_prefix (printf "sysroot_%s_%s_%s" $runtime $flatpak_arch $runtime_branch) -}}
{{- $artifact_prefix := or .artifact_prefix (printf "%s-%s-%s" $runtime $flatpak_arch $runtime_branch) -}}
{{- $sysroot_prefix := or .sysroot_prefix (printf "%s-sysroot" $artifact_prefix) -}}
{{- $sysroot_tarball := or .sysroot_tarball "" -}}
{{- $ostree_prefix := or .ostree_prefix (printf "ostree_%s_%s_%s" $runtime $flatpak_arch $runtime_branch) -}}
{{- $ostree_prefix := or .ostree_prefix (printf "%s-runtime" $artifact_prefix) -}}
{{- $ostree_tarball := or .ostree_tarball (printf "%s.tar.gz" $ostree_prefix) -}}
{{- $sources_prefix := or .sources_prefix (printf "sources_%s_%s_%s" $runtime $flatpak_arch $runtime_branch) -}}
{{- $sources_prefix := or .sources_prefix (printf "%s-sources" $artifact_prefix) -}}
{{- $sources_tarball := or .sources_tarball (printf "%s.tar.gz" $sources_prefix) -}}
{{- $debug_prefix := or .debug_prefix (printf "debug_%s_%s_%s" $runtime $flatpak_arch $runtime_branch) -}}
{{- $debug_prefix := or .debug_prefix (printf "%s-debug" $artifact_prefix) -}}
{{- $debug_tarball := or .debug_tarball (printf "%s.tar.gz" $debug_prefix) -}}
architecture: {{ $architecture }}
......@@ -121,9 +122,9 @@ actions:
chroot: false
command: |
"$RECIPEDIR/write-manifest" "$ROOTDIR"
cp "$ROOTDIR/usr/manifest.dpkg" "$ARTIFACTDIR/{{ $ostree_prefix }}.manifest.dpkg"
cp "$ROOTDIR/usr/manifest.dpkg.built-using" "$ARTIFACTDIR/{{ $ostree_prefix }}.manifest.dpkg.built-using"
cp "$ROOTDIR/usr/manifest.deb822.gz" "$ARTIFACTDIR/{{ $ostree_prefix }}.manifest.deb822.gz"
cp "$ROOTDIR/usr/manifest.dpkg" "$ARTIFACTDIR/{{ $artifact_prefix }}.manifest.dpkg"
cp "$ROOTDIR/usr/manifest.dpkg.built-using" "$ARTIFACTDIR/{{ $artifact_prefix }}.manifest.dpkg.built-using"
cp "$ROOTDIR/usr/manifest.deb822.gz" "$ARTIFACTDIR/{{ $artifact_prefix }}.manifest.deb822.gz"
{{ if $sdk }}
- action: run
......
......@@ -572,7 +572,7 @@ class Builder:
self.apt_sources[0].uri,
),
'-t', 'ospack:{}'.format(tarball + '.new'),
'-t', 'manifest_prefix:base-{}-{}'.format(
'-t', 'artifact_prefix:base-{}-{}'.format(
self.apt_suite,
','.join(self.dpkg_archs),
),
......@@ -708,11 +708,12 @@ class Builder:
else:
runtime = prefix + '.Platform'
ostree_prefix = '{}-ostree-{}-{}'.format(
artifact_prefix = '{}-{}-{}'.format(
runtime,
','.join(self.dpkg_archs),
self.runtime_branch,
)
ostree_prefix = artifact_prefix + '-runtime'
out_tarball = ostree_prefix + '.tar.gz'
argv = [
......@@ -723,6 +724,7 @@ class Builder:
'-t', 'flatpak_arch:{}'.format(self.flatpak_arch),
'-t', 'suite:{}'.format(self.apt_suite),
'-t', 'ospack:{}'.format(tarball),
'-t', 'artifact_prefix:{}'.format(artifact_prefix),
'-t', 'ostree_prefix:{}'.format(ostree_prefix),
'-t', 'ostree_tarball:{}'.format(out_tarball + '.new'),
'-t', 'runtime:{}'.format(runtime),
......@@ -764,26 +766,14 @@ class Builder:
argv.append('post_script:post_script')
if sdk:
sources_prefix = '{}-sources-{}-{}'.format(
runtime,
','.join(self.dpkg_archs),
self.runtime_branch,
)
sources_prefix = artifact_prefix + '-sources'
sources_tarball = sources_prefix + '.tar.gz'
debug_prefix = '{}-debug-{}-{}'.format(
runtime,
','.join(self.dpkg_archs),
self.runtime_branch,
)
debug_prefix = artifact_prefix + '-debug'
debug_tarball = debug_prefix + '.tar.gz'
if generate_sysroot_tarball:
sysroot_prefix = '{}-sysroot-{}-{}'.format(
runtime,
','.join(self.dpkg_archs),
self.runtime_branch,
)
sysroot_prefix = artifact_prefix + '-sysroot'
sysroot_tarball = sysroot_prefix + '.tar.gz'
argv.append('-t')
argv.append('sysroot_prefix:{}'.format(sysroot_prefix))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment