Skip to content

Commit

Permalink
chore: move bash completion into its own part
Browse files Browse the repository at this point in the history
  • Loading branch information
bepri committed Jan 24, 2025
1 parent 2be6de0 commit 4888c26
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions snap/snapcraft.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -127,10 +127,6 @@ parts:
uv export --no-dev --no-emit-workspace --no-emit-package pywin32 --output-file uv-requirements.txt
${SNAP}/libexec/snapcraft/craftctl default
PYTHONPATH=$CRAFT_PART_INSTALL/lib/python3.12/site-packages \
python3 -m craft_cli.completion $CRAFT_PROJECT_NAME rockcraft.cli:get_app_info \
> $CRAFT_PART_INSTALL/completion.sh
version="$("${CRAFT_STAGE}/usr/bin/python3" -c "import rockcraft;print(rockcraft.__version__)")"
${SNAP}/libexec/snapcraft/craftctl set version="$version"
[ -n "$(echo $version | grep "post")" ] && grade=devel || grade=stable
Expand All @@ -141,6 +137,15 @@ parts:
- rockcraft-libs
- libgit2

bash-completion:
after: [rockcraft]
plugin: nil
build-environment:
- PYTHONPATH: $CRAFT_PART_INSTALL/lib/python3.12/site-packages
override-build: |
python3 -m craft_cli.completion $CRAFT_PROJECT_NAME rockcraft.cli:get_app_info \
> $CRAFT_PART_INSTALL/completion.sh
umoci:
plugin: make
source: https://github.com/opencontainers/umoci.git
Expand Down

0 comments on commit 4888c26

Please sign in to comment.