Here is the help:
Options:
-s, --step [pull|build|stage|prime|strip]
only clean the specified step and those that
depend on it.
Example:
$ snapcraft clean my-part -s build
Error: no such option: -s
But --step works fine.
This issue broke all my scripts.
Do I have an option to use particular version? It self updates every time through snapd without asking. And breaking current build scripts. Thanks to automatic updates that cannot be disabled.
It’s snapcraft 3.8 / Ubuntu 18.04 (updated from 16.04 a couple of days ago). “-s” is still all over the place, I remember seeing many snapcraft diagnostic messages stating something like “…you need to run snapcraft clean -s prime…”
Ok, this option is only available when not using a base in your snapcraft.yaml. Using the long option --step does work. I will add a fix for the short option now.
I’m a bit unclear as to whether it is possible to clean a specific step when a base is in use. I can’t even get the long option to work using the current snapcraft snap stable channel, and a snapcraft.yamlwith a base
$ snap --version
snap 2.42
snapd 2.42
series 16
ubuntu 16.04
kernel 4.15.0-66-generic
$ snapcraft --version
snapcraft, version 3.8
$ snapcraft clean btcd --step build
Usage: snapcraft clean [OPTIONS] <part>...
Error: no such option: --step
$ snap info snapcraft
name: snapcraft
summary: easily create snaps
publisher: Canonicalâś“
contact: snaps@canonical.com
license: unset
description: |
Package, distribute, and update any app for Linux and IoT.
Snaps are containerised software packages that are simple to create and install. They auto-update
and are safe to run. And because they bundle their dependencies, they work on all major Linux
systems without modification.
commands:
- snapcraft
snap-id: vMTKRaLjnOJQetI78HjntT37VuoyssFE
tracking: stable
refresh-date: 5 days ago, at 12:03 EEST
channels:
stable: 3.8 2019-09-11 (3440) 60MB classic
candidate: 3.8 2019-09-09 (3440) 60MB classic
beta: ↑
edge: 3.8+git124.g0077d826 2019-10-29 (3667) 61MB classic
installed: 3.8 (3440) 60MB classic
$ snapcraft clean --help
Usage: snapcraft clean [OPTIONS] <part>...
Remove a part's assets.
Examples:
snapcraft clean
snapcraft clean my-part
Options:
--use-lxd Forces snapcraft to use LXD for this clean command.
--destructive-mode Forces snapcraft to try and use the current host to
clean.
-h, --help Show this message and exit.
Hi guys, any updates on the -s option or alternative?
Snapcraft is now version 5.0.
So how can we clean only build stage, without pulling from git another gigabytes of data?
I want to make many ad-hoc changes on src stage and try them before going through all “git commit-push-pull” on every single minor change?
Snapcraft is not able to detect changes in src directory.
P.S. I’ve discovered that I can delete all files except “pull” from “parts/mypart/state/” to achieve this goal. But it is somehow hacky)