mikes-macos-developer-disk-cleanup 1.0.7 → 1.0.8

Sign up to get free protection for your applications and to get access to all the features.
package/.release-it.json CHANGED
@@ -8,7 +8,7 @@
8
8
  "release": true
9
9
  },
10
10
  "npm": {
11
- "publish": false
11
+ "publish": true
12
12
  },
13
13
  "hooks": {
14
14
  "after:bump": "npm run release-changelog ${version}"
package/CHANGELOG.md CHANGED
@@ -2,6 +2,26 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file.
4
4
 
5
+ ## 1.0.8 - 2025-02-05
6
+
7
+ [64546f9](64546f9fb87b06d86703311de819256761e2f7ad)...[e452923](e452923ade48217127cc9c786a6e12af2eab3829)
8
+
9
+ ### Bug Fixes
10
+
11
+ - :bug: docker daemon detection ([24321d5](24321d58fb062a28cacaa1fd809da5c37f7d6e79))
12
+ - :bug: docker daemon detection ([6045125](604512591d2763cb5be4bc425b79d968c1697de6))
13
+ - :pencil2: typo ([720298f](720298fedd74c008c8b888d5169188a1aaca865b))
14
+ - :pencil2: typo ([e6620de](e6620deacacfbce8ae0292d208f4a1c2f3117aee))
15
+ - :bug: handle permissions issue ([7c56838](7c56838eee1fa245bf81b040ac4ee4b17dbca9bb))
16
+
17
+ ### Documentation
18
+
19
+ - :memo: README - fix ref to changelog ([4bfc4a4](4bfc4a4f01631e5a1b6c49e71aefc918251845fc))
20
+
21
+ ### Miscellaneous Tasks
22
+
23
+ - :construction_worker: release-it - auto-publish NPM module ([e452923](e452923ade48217127cc9c786a6e12af2eab3829))
24
+
5
25
  ## 1.0.7 - 2025-02-05
6
26
 
7
27
  [88faf33](88faf333e35787b53a8988f8a42647e5fde4bfdc)...[30f323d](30f323da067b92b69f912cea5ce85b90997cef44)
@@ -2,11 +2,13 @@ dockerFiles() {
2
2
  # Docker
3
3
  command -v docker >/dev/null 2>&1 && {
4
4
  echo "=== docker ==="
5
- echo " BEFORE DOCKER CLEANUP:"
6
- docker system df
7
- if [ $? -ne 0 ]; then
5
+ local DOCKER_RUNNING=0;
6
+ docker version && DOCKER_RUNNING=1 || DOCKER_RUNNING=0;
7
+ if [ ! $DOCKER_RUNNING == 1 ]; then
8
8
  echo "======= ERROR: docker daemon not running; skipping docker cleanup ======="
9
9
  else
10
+ echo " BEFORE DOCKER CLEANUP:"
11
+ docker system df
10
12
  # remove all docker artifacts
11
13
  echo " = removing all docker containers"
12
14
  docker ps -a -q | xargs -r docker rm — force
@@ -1,6 +1,6 @@
1
1
  homebrewCaches(){
2
2
  local BREW;
3
- if [ -f /opt/homebrew/bin/brew]; then
3
+ if [ -f /opt/homebrew/bin/brew ]; then
4
4
  # apple silicon
5
5
  BREW=/opt/homebrew/bin/brew
6
6
  elif [ -f /usr/local/bin/brew ]; then
@@ -1,6 +1,6 @@
1
1
  # remove everything in ~/Library/Caches
2
2
  libraryCaches() {
3
- local LIBRARYCACHESIZE=$(du -hs "${HOME}/Library/Caches" | cut -f1)
3
+ local LIBRARYCACHESIZE=$((du -hs "${HOME}/Library/Caches" | cut -f1 ) || echo "ERROR: COULD NOT RUN 'du'")
4
4
  echo "=== emptying ~/Library/Caches...(${LIBRARYCACHESIZE}) ==="
5
- rm -rf "${HOME}/Library/Caches"
5
+ rm -rf "${HOME}/Library/Caches" || echo "=== ERROR! COULD NOT empty ~/Library/Caches. Continuing. ==="
6
6
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mikes-macos-developer-disk-cleanup",
3
- "version": "1.0.7",
3
+ "version": "1.0.8",
4
4
  "description": "Cleans up a developer's mac disk space. Aggressively.",
5
5
  "bin": {
6
6
  "mikes-macos-disk-cleanup": "mikes-macos-disk-cleanup.sh"