Skip to content

Commit ad2ff3c

Browse files
committed
feat: add notarize script
1 parent 388129c commit ad2ff3c

File tree

5 files changed

+95
-40
lines changed

5 files changed

+95
-40
lines changed

README.md

Lines changed: 66 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ $ npm install -g codify
1818
$ codify COMMAND
1919
running command...
2020
$ codify (--version)
21-
codify/0.0.1 darwin-arm64 node-v20.15.0
21+
codify/0.3.0 darwin-arm64 node-v20.15.1
2222
$ codify --help [COMMAND]
2323
USAGE
2424
$ codify COMMAND
@@ -28,7 +28,9 @@ USAGE
2828
# Commands
2929
<!-- commands -->
3030
* [`codify apply`](#codify-apply)
31+
* [`codify destroy`](#codify-destroy)
3132
* [`codify help [COMMAND]`](#codify-help-command)
33+
* [`codify import`](#codify-import)
3234
* [`codify plan`](#codify-plan)
3335
* [`codify plugins`](#codify-plugins)
3436
* [`codify plugins add PLUGIN`](#codify-plugins-add-plugin)
@@ -40,7 +42,6 @@ USAGE
4042
* [`codify plugins uninstall [PLUGIN]`](#codify-plugins-uninstall-plugin)
4143
* [`codify plugins unlink [PLUGIN]`](#codify-plugins-unlink-plugin)
4244
* [`codify plugins update`](#codify-plugins-update)
43-
* [`codify uninstall`](#codify-uninstall)
4445

4546
## `codify apply`
4647

@@ -68,7 +69,33 @@ EXAMPLES
6869
$ codify apply
6970
```
7071

71-
_See code: [src/commands/apply/index.ts](https://github.com/kevinwang5658/codify/blob/v0.0.1/src/commands/apply/index.ts)_
72+
_See code: [src/commands/apply/index.ts](https://github.com/kevinwang5658/codify/blob/v0.3.0/src/commands/apply/index.ts)_
73+
74+
## `codify destroy`
75+
76+
Destroy or uninstall a resource (or many resources).
77+
78+
```
79+
USAGE
80+
$ codify destroy [--json] [--debug] [-o plain|default|debug|json] [-s]
81+
82+
FLAGS
83+
-o, --output=<option> [default: default]
84+
<options: plain|default|debug|json>
85+
-s, --secure
86+
--debug
87+
88+
GLOBAL FLAGS
89+
--json Format output as json.
90+
91+
DESCRIPTION
92+
Destroy or uninstall a resource (or many resources).
93+
94+
EXAMPLES
95+
$ codify destroy homebrew nvm
96+
```
97+
98+
_See code: [src/commands/destroy.ts](https://github.com/kevinwang5658/codify/blob/v0.3.0/src/commands/destroy.ts)_
7299

73100
## `codify help [COMMAND]`
74101

@@ -88,7 +115,34 @@ DESCRIPTION
88115
Display help for codify.
89116
```
90117

91-
_See code: [@oclif/plugin-help](https://github.com/oclif/plugin-help/blob/v6.2.4/src/commands/help.ts)_
118+
_See code: [@oclif/plugin-help](https://github.com/oclif/plugin-help/blob/v6.2.5/src/commands/help.ts)_
119+
120+
## `codify import`
121+
122+
Generate codify configs from existing installations
123+
124+
```
125+
USAGE
126+
$ codify import [--json] [--debug] [-o plain|default|debug|json] [-s] [-p <value>]
127+
128+
FLAGS
129+
-o, --output=<option> [default: default]
130+
<options: plain|default|debug|json>
131+
-p, --path=<value> path to project
132+
-s, --secure
133+
--debug
134+
135+
GLOBAL FLAGS
136+
--json Format output as json.
137+
138+
DESCRIPTION
139+
Generate codify configs from existing installations
140+
141+
EXAMPLES
142+
$ codify import homebrew nvm
143+
```
144+
145+
_See code: [src/commands/import.ts](https://github.com/kevinwang5658/codify/blob/v0.3.0/src/commands/import.ts)_
92146

93147
## `codify plan`
94148

@@ -116,7 +170,7 @@ EXAMPLES
116170
$ codify plan
117171
```
118172

119-
_See code: [src/commands/plan/index.ts](https://github.com/kevinwang5658/codify/blob/v0.0.1/src/commands/plan/index.ts)_
173+
_See code: [src/commands/plan/index.ts](https://github.com/kevinwang5658/codify/blob/v0.3.0/src/commands/plan/index.ts)_
120174

121175
## `codify plugins`
122176

@@ -139,7 +193,7 @@ EXAMPLES
139193
$ codify plugins
140194
```
141195

142-
_See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.3.3/src/commands/plugins/index.ts)_
196+
_See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.3.4/src/commands/plugins/index.ts)_
143197

144198
## `codify plugins add PLUGIN`
145199

@@ -213,7 +267,7 @@ EXAMPLES
213267
$ codify plugins inspect myplugin
214268
```
215269

216-
_See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.3.3/src/commands/plugins/inspect.ts)_
270+
_See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.3.4/src/commands/plugins/inspect.ts)_
217271

218272
## `codify plugins install PLUGIN`
219273

@@ -262,7 +316,7 @@ EXAMPLES
262316
$ codify plugins install someuser/someplugin
263317
```
264318

265-
_See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.3.3/src/commands/plugins/install.ts)_
319+
_See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.3.4/src/commands/plugins/install.ts)_
266320

267321
## `codify plugins link PATH`
268322

@@ -292,7 +346,7 @@ EXAMPLES
292346
$ codify plugins link myplugin
293347
```
294348

295-
_See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.3.3/src/commands/plugins/link.ts)_
349+
_See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.3.4/src/commands/plugins/link.ts)_
296350

297351
## `codify plugins remove [PLUGIN]`
298352

@@ -333,7 +387,7 @@ FLAGS
333387
--reinstall Reinstall all plugins after uninstalling.
334388
```
335389

336-
_See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.3.3/src/commands/plugins/reset.ts)_
390+
_See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.3.4/src/commands/plugins/reset.ts)_
337391

338392
## `codify plugins uninstall [PLUGIN]`
339393

@@ -361,7 +415,7 @@ EXAMPLES
361415
$ codify plugins uninstall myplugin
362416
```
363417

364-
_See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.3.3/src/commands/plugins/uninstall.ts)_
418+
_See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.3.4/src/commands/plugins/uninstall.ts)_
365419

366420
## `codify plugins unlink [PLUGIN]`
367421

@@ -405,31 +459,5 @@ DESCRIPTION
405459
Update installed plugins.
406460
```
407461

408-
_See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.3.3/src/commands/plugins/update.ts)_
409-
410-
## `codify uninstall`
411-
412-
Uninstall a given resource based on id.
413-
414-
```
415-
USAGE
416-
$ codify uninstall [--json] [--debug] [-o plain|default|debug|json] [-s]
417-
418-
FLAGS
419-
-o, --output=<option> [default: default]
420-
<options: plain|default|debug|json>
421-
-s, --secure
422-
--debug
423-
424-
GLOBAL FLAGS
425-
--json Format output as json.
426-
427-
DESCRIPTION
428-
Uninstall a given resource based on id.
429-
430-
EXAMPLES
431-
$ codify uninstall
432-
```
433-
434-
_See code: [src/commands/uninstall.ts](https://github.com/kevinwang5658/codify/blob/v0.0.1/src/commands/uninstall.ts)_
462+
_See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.3.4/src/commands/plugins/update.ts)_
435463
<!-- commandsstop -->

codify.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@
1616
"type": "homebrew",
1717
"formulae": [
1818
"cirruslabs/cli/cirrus",
19-
"cirruslabs/cli/tart"
19+
"cirruslabs/cli/tart",
20+
"jq"
2021
]
2122
},
2223
{

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@
102102
"start:dev": "./bin/dev.js",
103103
"start:vm": "npm run build && npm run pack:macos && npm run start:vm"
104104
},
105-
"version": "0.0.1",
105+
"version": "0.3.0",
106106
"bugs": "https://github.com/kevinwang5658/codify/issues",
107107
"keywords": [
108108
"oclif"

scripts/README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
## Notarize script
2+
3+
Set up notarize profiles first (see notion).
4+
Run notarize script from scripts folder.
5+
Make sure that issues is null in the log.

scripts/notarize.sh

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
#!/bin/bash
2+
for filename in ../dist/macos/*.pkg; do
3+
echo "Uploading and notarizing $filename with Apple... (5-10 minutes)"
4+
RESULT=$(
5+
xcrun notarytool submit $filename \
6+
--keychain-profile "notarytool-password" \
7+
--wait \
8+
-f json
9+
)
10+
11+
echo "Nortary tool submit completed with result:"
12+
echo $RESULT
13+
14+
SUBMISSION_ID=$(jq -r '.id' <<< $RESULT)
15+
xcrun notarytool log $SUBMISSION_ID --keychain-profile "notarytool-password"
16+
17+
echo "Stapling notary to $filename"
18+
xcrun stapler staple $filename
19+
echo "Done stapling"
20+
done
21+

0 commit comments

Comments
 (0)