tools.deploy.backend: add word for deleting cached staging images.

db4
John Benediktsson 2014-12-23 08:56:05 -08:00
parent c0dda5c7e9
commit 0b460c431b
2 changed files with 8 additions and 5 deletions

View File

@ -65,6 +65,13 @@ ERROR: can't-deploy-library-file library ;
"-" join "." my-arch 3append
"staging." ".image" surround cache-file ;
: delete-staging-images ( -- )
cache-directory [
[ "staging." head? ] filter
"." my-arch ".image" 3append [ tail? ] curry filter
[ delete-file ] each
] with-directory-files ;
: staging-command-line ( profile -- flags )
[
[

View File

@ -10,11 +10,7 @@ IN: tools.deploy.tests
! Delete all cached staging images in case syntax or
! other core vocabularies have changed and staging
! images are stale.
cache-directory [
[ "staging." head? ] filter
my-arch ".image" append [ tail? ] curry filter
[ delete-file ] each
] with-directory-files
delete-staging-images
[ "nosuchvocab" deploy ] [ no-vocab? ] must-fail-with