Skip to content
This repository has been archived by the owner on Mar 18, 2021. It is now read-only.

Commit

Permalink
Merge pull request #29 from nottrobin/clean-cache-django-fixes
Browse files Browse the repository at this point in the history
Only clear pip cache in django scripts
  • Loading branch information
anthonydillon committed Jul 4, 2017
2 parents 2e5b446 + d05087d commit 17f6248
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 3 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
node_modules/
package-lock.json
1 change: 1 addition & 0 deletions generators/run/templates/gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ pids

# [deps] Local dependencies
.bundle/
.package-lock.json # Normally lockfiles would be committed, but we use yarn instead of NPM for locking dependencies
node_modules/
bower_components/
vendor/
Expand Down
6 changes: 4 additions & 2 deletions generators/run/templates/run
Original file line number Diff line number Diff line change
Expand Up @@ -341,11 +341,13 @@ case $run_command in
if [ -n "${containers_using_volume}" ]; then docker rm --force ${containers_using_volume}; fi
docker volume rm --force ${yarn_cache_volume}
# Clean node cache volume
<% if (django) { %>
# Clean pip cache volume
echo "Removing cache volume ${pip_cache_volume}"
containers_using_volume=$(docker ps --quiet --all --filter "volume=${pip_cache_volume}")
if [ -n "${containers_using_volume}" ]; then docker rm --force ${containers_using_volume}; fi
<% if (django) { %> docker volume rm --force ${pip_cache_volume} <% } %>
docker volume rm --force ${pip_cache_volume}
<% } %>
;;
<% if (django) { %> "django")
expose_port=""
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "generator-canonical-webteam",
"version": "0.3.1",
"version": "0.3.2",
"description": "Generators for creating and maintaining Canonical webteam projects",
"homepage": "https://design.canonical.com/team",
"author": {
Expand Down

0 comments on commit 17f6248

Please sign in to comment.