mikes-macos-developer-disk-cleanup 1.0.9 → 1.0.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.env +1 -1
- package/CHANGELOG.md +36 -21
- package/cliff.toml +2 -1
- package/mikes-macos-disk-cleanup.sh +22 -19
- package/modules/android-sdk.awk +32 -20
- package/modules/ruby-gems.sh +1 -1
- package/modules/xcode-artifacts.sh +7 -0
- package/package.json +1 -1
package/.env
CHANGED
@@ -5,4 +5,4 @@
|
|
5
5
|
DOTENV_PUBLIC_KEY="036dc3b1c538f3b753f28504685c42364d6aa3fd3cdc0d544ffab9dbe9c8d2afef"
|
6
6
|
|
7
7
|
# .env
|
8
|
-
GITHUB_TOKEN="encrypted:
|
8
|
+
GITHUB_TOKEN="encrypted:BDXSoNLrWFQCQpL2MYnEhmCdGz0TR7znqFIMghNtujL0ADFC5shdKOG/kq7dS1i62whj0gBxZLZYXpg8babGmf9fPM2fBCTxKEgOuSYlRItCYPK4neGRDmonuaj7OOQADGLSw16uHZIb+PnUxQYWk+fkvEA/e53PySLy6H/haK2ld5rFKZLbRjmLk2Rh/JrvWko3DFA5mVQSHqt/gB0m4Rwm/LxTjUAXkeWTBMZP4ZkzGK3v0s87CbqOQN5GOg=="
|
package/CHANGELOG.md
CHANGED
@@ -2,9 +2,44 @@
|
|
2
2
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
4
4
|
|
5
|
+
## 1.0.10 - 2025-03-04
|
6
|
+
|
7
|
+
[v1.0.9...1.0.10](../../compare/v1.0.9...1.0.10)
|
8
|
+
|
9
|
+
### :rocket: New features
|
10
|
+
|
11
|
+
- *(xcode-artifacts)* :sparkles: remove iOS runtimes [<sup>(586155a)</sup>][586155a]
|
12
|
+
|
13
|
+
### :bug: Bug fixes
|
14
|
+
|
15
|
+
- *(ruby-gems)* :bug: remove dry-run flag [<sup>(5525759)</sup>][5525759]
|
16
|
+
- *(android-sdk)* :bug: fix obsolete package delete [<sup>(60c184a)</sup>][60c184a]
|
17
|
+
|
18
|
+
### :memo: Documentation
|
19
|
+
|
20
|
+
- *(infra)* :memo: fix changelog links [<sup>(a81eb4e)</sup>][a81eb4e]
|
21
|
+
|
22
|
+
### :recycle: Refactor
|
23
|
+
|
24
|
+
- :recycle: main : separate module loading and execution [<sup>(496b562)</sup>][496b562]
|
25
|
+
|
26
|
+
### :gear: Miscellaneous Tasks
|
27
|
+
|
28
|
+
- *(infra)* :memo: workaround git-cliff bug [<sup>(21e404c)</sup>][21e404c]
|
29
|
+
- *(infra)* :wrench: .env (encrypted): rotate GITHUB_TOKEN [<sup>(2582880)</sup>][2582880]
|
30
|
+
|
31
|
+
<!-- LINKS -->
|
32
|
+
[21e404c]:../../commit/21e404c3062b38ab03beec99b5a1cd35c54c9a49
|
33
|
+
[a81eb4e]:../../commit/a81eb4e5c3830d6b9ae01e07ce8f0a9d90e7b575
|
34
|
+
[2582880]:../../commit/2582880f7274c54c021d639f87c748a11996e204
|
35
|
+
[5525759]:../../commit/5525759d5fabda664b505f1721ddbf661a3b4ebd
|
36
|
+
[60c184a]:../../commit/60c184a8ccde88d9ee3a2e51ca9d8fd01877e03a
|
37
|
+
[586155a]:../../commit/586155aa21c63b79bf2f026d41f8ee24038852bd
|
38
|
+
[496b562]:../../commit/496b562e97e697ff41f68207b319996d8558c143
|
39
|
+
|
5
40
|
## 1.0.9 - 2025-02-12
|
6
41
|
|
7
|
-
[v1.0.8...
|
42
|
+
[v1.0.8...v1.0.9](../../compare/v1.0.8...v1.0.9)
|
8
43
|
|
9
44
|
### :memo: Documentation
|
10
45
|
|
@@ -39,7 +74,6 @@ All notable changes to this project will be documented in this file.
|
|
39
74
|
### :gear: Miscellaneous Tasks
|
40
75
|
|
41
76
|
- :construction_worker: release-it - auto-publish NPM module [<sup>(e452923)</sup>][e452923]
|
42
|
-
- Release 1.0.8 [<sup>(6424ffc)</sup>][6424ffc]
|
43
77
|
|
44
78
|
<!-- LINKS -->
|
45
79
|
[4bfc4a4]:../../commit/4bfc4a4f01631e5a1b6c49e71aefc918251845fc
|
@@ -50,7 +84,6 @@ All notable changes to this project will be documented in this file.
|
|
50
84
|
[e6620de]:../../commit/e6620deacacfbce8ae0292d208f4a1c2f3117aee
|
51
85
|
[7c56838]:../../commit/7c56838eee1fa245bf81b040ac4ee4b17dbca9bb
|
52
86
|
[e452923]:../../commit/e452923ade48217127cc9c786a6e12af2eab3829
|
53
|
-
[6424ffc]:../../commit/6424ffcda40491db4ff9ef84a8adf38acdb67df1
|
54
87
|
|
55
88
|
## 1.0.7 - 2025-02-05
|
56
89
|
|
@@ -68,14 +101,12 @@ All notable changes to this project will be documented in this file.
|
|
68
101
|
### :gear: Miscellaneous Tasks
|
69
102
|
|
70
103
|
- :construction_worker: fix changelog generation [<sup>(30f323d)</sup>][30f323d]
|
71
|
-
- Release 1.0.7 [<sup>(64546f9)</sup>][64546f9]
|
72
104
|
|
73
105
|
<!-- LINKS -->
|
74
106
|
[8792d75]:../../commit/8792d759de54c46be3cf3471a7ef3c18f937a41c
|
75
107
|
[2aace79]:../../commit/2aace79ab5570049af7bfd87908cbfd4a5f9334f
|
76
108
|
[9b28ba2]:../../commit/9b28ba2f4163454a5d36e48af93c3e51509a8b9c
|
77
109
|
[30f323d]:../../commit/30f323da067b92b69f912cea5ce85b90997cef44
|
78
|
-
[64546f9]:../../commit/64546f9fb87b06d86703311de819256761e2f7ad
|
79
110
|
|
80
111
|
## 1.0.6 - 2024-12-09
|
81
112
|
|
@@ -85,12 +116,10 @@ All notable changes to this project will be documented in this file.
|
|
85
116
|
|
86
117
|
- :hammer: add GITHUB_TOKEN [<sup>(4d14cbf)</sup>][4d14cbf]
|
87
118
|
- :arrow_up: update dependency to node >= 18 [<sup>(ca92511)</sup>][ca92511]
|
88
|
-
- Release 1.0.6 [<sup>(88faf33)</sup>][88faf33]
|
89
119
|
|
90
120
|
<!-- LINKS -->
|
91
121
|
[4d14cbf]:../../commit/4d14cbfae18980d645d60f10a7feef9ce7650b06
|
92
122
|
[ca92511]:../../commit/ca925115cb3137e795d55769dfa7332cf38b89cf
|
93
|
-
[88faf33]:../../commit/88faf333e35787b53a8988f8a42647e5fde4bfdc
|
94
123
|
|
95
124
|
## 1.0.5 - 2024-12-09
|
96
125
|
|
@@ -109,7 +138,6 @@ All notable changes to this project will be documented in this file.
|
|
109
138
|
- *(infra)* :hammer: add vscode conventional commit scopes [<sup>(84e7ca5)</sup>][84e7ca5]
|
110
139
|
- *(infra)* :hammer: add vscode conventional commit scopes [<sup>(5979eed)</sup>][5979eed]
|
111
140
|
- *(infra)* :hammer: add release-it config [<sup>(639b8bb)</sup>][639b8bb]
|
112
|
-
- Release 1.0.5 [<sup>(462ee69)</sup>][462ee69]
|
113
141
|
|
114
142
|
<!-- LINKS -->
|
115
143
|
[6bb0ba6]:../../commit/6bb0ba6fcca63f56f44808eff220eda86579ce85
|
@@ -117,24 +145,11 @@ All notable changes to this project will be documented in this file.
|
|
117
145
|
[5979eed]:../../commit/5979eed216a65ef6faa733bf71d2a5f47ffb708b
|
118
146
|
[639b8bb]:../../commit/639b8bb2122be6c4d7a83267c516636458d1743c
|
119
147
|
[12729bd]:../../commit/12729bd019abd9219e6cb3eeda040fc90e836228
|
120
|
-
[462ee69]:../../commit/462ee6964edfa65a224b1cc56f1f7cc15fdc600a
|
121
148
|
|
122
149
|
## 1.0.4 - 2024-10-03
|
123
150
|
|
124
151
|
[v1.0.3...v1.0.4](../../compare/v1.0.3...v1.0.4)
|
125
152
|
|
126
|
-
<!-- LINKS -->
|
127
|
-
[bc39b3e]:../../commit/bc39b3e006b19b68acd7deb3b30a8be93b50a52b
|
128
|
-
|
129
153
|
## 1.0.3 - 2024-10-03
|
130
154
|
|
131
|
-
|
132
|
-
<!-- LINKS -->
|
133
|
-
[9ae79ca]:../../commit/9ae79caa43c647f21aee76bab842286e1b9b10ff
|
134
|
-
[1d768b4]:../../commit/1d768b473316daacb557b0cbe8a25ab69f6c7f94
|
135
|
-
[c33840f]:../../commit/c33840f3acdee816ec75861bc7d96c9b9497579d
|
136
|
-
[dd9c730]:../../commit/dd9c73025a7e2fc9f07766dd76e67a85eafe4c1c
|
137
|
-
[5b23c45]:../../commit/5b23c45d8ee2ce2a051a99295c8701e1c747ec8f
|
138
|
-
[d44b8c0]:../../commit/d44b8c0a12b30f9b4d8f15f89a1ee80150d147cd
|
139
|
-
|
140
155
|
<!-- generated by git-cliff -->
|
package/cliff.toml
CHANGED
@@ -10,6 +10,7 @@ All notable changes to this project will be documented in this file.\n
|
|
10
10
|
# template for the changelog body
|
11
11
|
# https://keats.github.io/tera/docs/#introduction
|
12
12
|
body = """\
|
13
|
+
{% set orig_version = version %}\
|
13
14
|
{% if version %}\
|
14
15
|
## {{ version | trim_start_matches(pat="v") }} - {{ timestamp | date(format="%Y-%m-%d") }}
|
15
16
|
{% else %}\
|
@@ -17,7 +18,7 @@ body = """\
|
|
17
18
|
{% endif %}{% raw %}\n{% endraw %}\
|
18
19
|
{% if previous %}\
|
19
20
|
{% if previous.version and version %}\
|
20
|
-
[{{ previous.version }}...{{
|
21
|
+
[{{ previous.version }}...{{ orig_version }}](../../compare/{{ previous.version }}...{{ orig_version }})
|
21
22
|
{% endif %}\
|
22
23
|
{% endif %}\
|
23
24
|
{% for group, commits in commits | group_by(attribute="group") %}
|
@@ -133,58 +133,67 @@ source "${DIR}/modules/hints.sh"
|
|
133
133
|
|
134
134
|
# CocoaPods
|
135
135
|
source "${DIR}/modules/cocoapods.sh"
|
136
|
-
cocoapods
|
137
136
|
|
138
137
|
# remove everything in ~/Library/Caches
|
139
138
|
source "${DIR}/modules/library-caches.sh"
|
140
|
-
libraryCaches
|
141
139
|
|
142
140
|
# remove everything from Trash - this sometimes prompts for confirmation
|
143
141
|
source "${DIR}/modules/trash.sh"
|
144
|
-
trash
|
145
142
|
|
146
143
|
# meteor
|
147
144
|
source "${DIR}/modules/meteor-builds-and-packages.sh"
|
148
|
-
meteorBuildsAndPackages
|
149
145
|
|
150
146
|
# npm cache
|
151
147
|
source "${DIR}/modules/npm-cache.sh"
|
152
|
-
npmCache
|
153
148
|
|
154
149
|
# yarn cache
|
155
150
|
source "${DIR}/modules/yarn-cache.sh"
|
156
|
-
yarnCache
|
157
151
|
|
158
152
|
# bun cache
|
159
153
|
source "${DIR}/modules/bun-cache.sh"
|
160
|
-
bunCache
|
161
154
|
|
162
155
|
# ### XCode ###
|
163
156
|
source "${DIR}/modules/xcode-artifacts.sh"
|
164
|
-
xcodeArtifacts
|
165
157
|
|
166
158
|
# Clear shared gradle caches
|
167
159
|
source "${DIR}/modules/gradle-shared.sh"
|
168
|
-
gradleShared
|
169
160
|
|
170
161
|
# node_modules folders
|
171
162
|
source "${DIR}/modules/node-modules.sh"
|
172
|
-
nodeModules
|
173
163
|
|
174
164
|
# ruby gems
|
175
165
|
source "${DIR}/modules/ruby-gems.sh"
|
176
|
-
rubyGems
|
177
166
|
|
178
167
|
# Docker
|
179
168
|
source "${DIR}/modules/docker-files.sh"
|
180
|
-
dockerFiles
|
181
169
|
|
182
170
|
# Android projects - remove build folders
|
183
171
|
source "${DIR}/modules/android-build-folders.sh"
|
184
|
-
androidBuildFolders
|
185
172
|
|
186
173
|
# Android SDKs
|
187
174
|
source "${DIR}/modules/android-sdk.sh"
|
175
|
+
|
176
|
+
# Android AVDs
|
177
|
+
source "${DIR}/modules/android-avd.sh"
|
178
|
+
|
179
|
+
# Homebrew Caches
|
180
|
+
source "${DIR}/modules/homebrew-caches.sh"
|
181
|
+
|
182
|
+
# ======
|
183
|
+
# Now run all our modules
|
184
|
+
cocoapods
|
185
|
+
libraryCaches
|
186
|
+
trash
|
187
|
+
meteorBuildsAndPackages
|
188
|
+
npmCache
|
189
|
+
yarnCache
|
190
|
+
bunCache
|
191
|
+
xcodeArtifacts
|
192
|
+
gradleShared
|
193
|
+
nodeModules
|
194
|
+
rubyGems
|
195
|
+
dockerFiles
|
196
|
+
androidBuildFolders
|
188
197
|
set +e ; # don't exit on error
|
189
198
|
androidSDK
|
190
199
|
RETCODE=$?
|
@@ -199,13 +208,7 @@ if [ ${RETCODE} -ne 0 ]; then
|
|
199
208
|
exit ${RETCODE}
|
200
209
|
fi
|
201
210
|
fi
|
202
|
-
|
203
|
-
# Android AVDs
|
204
|
-
source "${DIR}/modules/android-avd.sh"
|
205
211
|
androidAVD
|
206
|
-
|
207
|
-
# Homebrew Caches
|
208
|
-
source "${DIR}/modules/homebrew-caches.sh"
|
209
212
|
homebrewCaches
|
210
213
|
|
211
214
|
# get the disk usage now that we've run the cleanup
|
package/modules/android-sdk.awk
CHANGED
@@ -61,39 +61,51 @@ BEGIN{
|
|
61
61
|
}
|
62
62
|
lastPath="";
|
63
63
|
lastCat="";
|
64
|
+
processedHeading=0;
|
64
65
|
delete itemsToRemove[0]; # initializes a new array
|
65
66
|
itemsToRemoveLength=0; # length of array
|
66
67
|
}
|
67
68
|
/Installed packages:/{
|
68
69
|
inInstalled=1;
|
69
70
|
inObsolete=0;
|
71
|
+
processedHeading=0;
|
70
72
|
}
|
71
73
|
/Installed Obsolete Packages:/{
|
72
74
|
inInstalled=0;
|
73
75
|
inObsolete=1;
|
76
|
+
processedHeading=0;
|
74
77
|
}
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
#
|
84
|
-
|
85
|
-
|
78
|
+
$7 ~ /^-------/ { # this is the end of a heading; move to the next line
|
79
|
+
processedHeading=1;
|
80
|
+
next;
|
81
|
+
}
|
82
|
+
$0 ~ /^.+$/ { # non-empty line
|
83
|
+
if (processedHeading == 1) {
|
84
|
+
path=$1;
|
85
|
+
version=$3;
|
86
|
+
loc=$NF; # last field is location; description has spaces to hard to grab
|
87
|
+
cat=path;
|
88
|
+
gsub(/;.+$/,"",cat); # the category is just the first portion of the path before the semicolon e.g. "platforms"
|
89
|
+
|
90
|
+
if (inInstalled) {
|
91
|
+
# If this category is the same as the last one, add the
|
92
|
+
# previous record to our list of ones to remove (and keep only the most recent).
|
93
|
+
if (cat == lastCat) {
|
94
|
+
# add the last category as a new item on the end of our array
|
95
|
+
printf("Adding least-recent\"%s\" to itemsToRemove (superceded by \"%s\")\n", lastPath, path);
|
96
|
+
itemsToRemoveLength++;
|
97
|
+
itemsToRemove[itemsToRemoveLength] = lastPath;
|
98
|
+
} else {
|
99
|
+
# we're in a category we haven't yet seen (or the output is not sorted and everything will fall apart)
|
100
|
+
}
|
101
|
+
lastCat = cat;
|
102
|
+
lastPath = path;
|
103
|
+
} else if (inObsolete) {
|
104
|
+
printf("Obsolete: Adding \"%s\" to itemsToRemove\n", path);
|
105
|
+
# we'll just add all obsolete packages to the list of items to remove
|
86
106
|
itemsToRemoveLength++;
|
87
|
-
itemsToRemove[itemsToRemoveLength] =
|
88
|
-
} else {
|
89
|
-
# we're in a new category
|
107
|
+
itemsToRemove[itemsToRemoveLength] = path;
|
90
108
|
}
|
91
|
-
lastCat = cat;
|
92
|
-
lastPath = path;
|
93
|
-
} else if (inObsolete) {
|
94
|
-
# we'll just add all obsolete packages to the list of items to remove
|
95
|
-
itemsToRemoveLength++;
|
96
|
-
itemsToRemove[itemsToRemoveLength] = path;
|
97
109
|
}
|
98
110
|
}
|
99
111
|
END{
|
package/modules/ruby-gems.sh
CHANGED
@@ -41,5 +41,12 @@ xcodeArtifacts() {
|
|
41
41
|
echo "${DEVICESUPPORTCOMMAND}"
|
42
42
|
addHint "${DEVICESUPPORTCOMMAND}"
|
43
43
|
fi
|
44
|
+
|
45
|
+
echo " removing unavailable simulator devices..."
|
46
|
+
xcrun simctl delete unavailable
|
47
|
+
|
48
|
+
echo " removing all but the most recent iOS simulator runtime..."
|
49
|
+
xcrun simctl runtime list | grep -E '^iOS' | sort -r -n -k 2 | awk 'NR>1{print $5}' | xargs -I{} xcrun simctl runtime delete {}
|
50
|
+
|
44
51
|
fi # xcode
|
45
52
|
}
|
package/package.json
CHANGED