fix(release): a snap built in a clone of its own is packed inside it, then moved into the release's folder
All checks were successful
CI / check (push) Successful in 39m47s
CI / deploy (push) Successful in 59s

snapcraft packs nowhere outside the project it builds, so Todo 0.1.0's release stopped
after its snap was built ("Cannot create packages outside of the project tree").

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Tizian 「ティツィアーン」 <raisondetredev@pm.me>
This commit is contained in:
Tizian 「ティツィアーン」 2026-11-03 09:20:42 +01:00
commit 34001b1aff
Signed by: raisondetredev
GPG key ID: 07F6FCF405488B64

View file

@ -167,6 +167,22 @@ void main() {
);
});
test('is packed inside its clone, as snapcraft packs nowhere outside the '
"project, and Learn's into the release's folder", () {
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',
),
'/repo/build/x',
);
});
test('names the snap and the part the release tool takes', () {
expect(recipe, contains('name: ${snap.name}\n'));
expect(recipe, contains('\n ${snap.part}:\n after: [flutter]\n'));