Skip to content

Commit 91e0f8a

Browse files
Sergio Schvezovlengau
andauthored
commands: require charmcraft name for command (#1093)
Co-authored-by: Alex Lowe <[email protected]>
1 parent db5d54e commit 91e0f8a

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

charmcraft/commands/pack.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@
2121
import pathlib
2222
import shutil
2323
import subprocess
24-
import sys
2524
import tempfile
2625
from typing import Any, Collection, Dict, List, Mapping
2726

@@ -336,7 +335,7 @@ def _recursive_pack_bundle(
336335
charms: Mapping[str, pathlib.Path],
337336
) -> List[pathlib.Path]:
338337
bundle_charms = bundle_config.get("applications", {})
339-
command_args = _get_charm_pack_args([sys.argv[0], "pack", "--verbose"], parsed_args)
338+
command_args = _get_charm_pack_args(["charmcraft", "pack", "--verbose"], parsed_args)
340339
charms = _subprocess_pack_charms(charms, command_args)
341340
for name, value in bundle_charms.items():
342341
if name in charms:

tests/spread/charms/bundle/task.yaml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
summary: Recursively pack a bundle with all charms on
2-
manual: true
32
systems:
43
- ubuntu-22.04-64
54
kill-timeout: 30m
@@ -11,7 +10,10 @@ prepare: |
1110
git clone --depth=1 "${BUNDLE}" bundle
1211
1312
restore: |
14-
pushd bundle
13+
pushd bundle/charms/jupyter-controller
14+
charmcraft clean
15+
popd
16+
pushd bundle/charms/jupyter-ui
1517
charmcraft clean
1618
popd
1719
@@ -30,4 +32,5 @@ execute: |
3032
grep "charm: ${PWD}" output_bundle.yaml | cut -d: -f2 | xargs file -E
3133
3234
# Test deploying the bundle.
33-
juju deploy --dry-run *.zip
35+
# TODO: install juju on the runner and re-enable this.
36+
# juju deploy --dry-run *.zip

0 commit comments

Comments
 (0)