fix(release): a snap built in a clone of its own is packed without --output, into the clone
snapcraft builds in LXD with the project mounted at /root/project and passes --output on unchanged: naming the clone itself, it took the clone for a file in the folder above, outside the project, and refused it again. Without --output it packs into the clone (checked with snapcraft 9.2.1 in Todo's clone), from where the release tool moves it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Tizian 「ティツィアーン」 <raisondetredev@pm.me>
This commit is contained in:
parent
34001b1aff
commit
c8d94d0ceb
1 changed files with 17 additions and 29 deletions
|
|
@ -167,18 +167,12 @@ void main() {
|
|||
);
|
||||
});
|
||||
|
||||
test('is packed inside its clone, as snapcraft packs nowhere outside the '
|
||||
"project, and Learn's into the release's folder", () {
|
||||
test('is packed without --output, into its clone, as snapcraft takes the '
|
||||
"clone's own path for a file outside the project; Learn's into the "
|
||||
"release's folder", () {
|
||||
expect(snap.packOutput(root: '/repo', out: 'build/x'), isNull);
|
||||
expect(
|
||||
snap.packPath(home: '/home/someone', root: '/repo', out: 'build/x'),
|
||||
'/home/someone/.cache/halkyon-release/snap/halkyon-todo',
|
||||
);
|
||||
expect(
|
||||
learnRelease.snap!.packPath(
|
||||
home: '/home/someone',
|
||||
root: '/repo',
|
||||
out: 'build/x',
|
||||
),
|
||||
learnRelease.snap!.packOutput(root: '/repo', out: 'build/x'),
|
||||
'/repo/build/x',
|
||||
);
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in a new issue