xcodebuild-axi 0.1.5 → 0.1.7
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/CHANGELOG.md
CHANGED
|
@@ -6,6 +6,37 @@ Notable changes to `xcodebuild-axi`. Versions follow
|
|
|
6
6
|
|
|
7
7
|
## [Unreleased]
|
|
8
8
|
|
|
9
|
+
### Fixed
|
|
10
|
+
|
|
11
|
+
- `export --artifacts-dir <path>` — the flag `build`, `archive` and `test`
|
|
12
|
+
gained in 0.1.5, on the one command a release pipeline cannot do without.
|
|
13
|
+
Its log went to the tool's cache regardless, so a failed upload left its
|
|
14
|
+
transcript exactly where CI's artifact step does not look. The command that
|
|
15
|
+
talks to App Store Connect was the worst one to leave behind.
|
|
16
|
+
|
|
17
|
+
### Added
|
|
18
|
+
|
|
19
|
+
- `export --upload` writes `destination: upload` into the generated options
|
|
20
|
+
plist, so a CI ship can hand the build to App Store Connect instead of
|
|
21
|
+
writing an `.ipa` nobody collects. Without it, `--method` could only ever
|
|
22
|
+
produce a file on disk and every uploading pipeline had to author the XML by
|
|
23
|
+
hand — which is the side quest `--method` exists to remove.
|
|
24
|
+
- `export --no-manage-version` sets `manageAppVersionAndBuildNumber` to
|
|
25
|
+
`false`. Xcode's default is to re-pick the build number at upload, which
|
|
26
|
+
discards a number set at archive time and, with it, any way to tell which
|
|
27
|
+
commit a build came from.
|
|
28
|
+
- `export --no-upload-symbols` reaches `uploadSymbols`, which the plist builder
|
|
29
|
+
already supported and no flag could set.
|
|
30
|
+
|
|
31
|
+
### Fixed
|
|
32
|
+
|
|
33
|
+
- A successful upload no longer reports `products: 0 files written to …`. An
|
|
34
|
+
upload leaves nothing on disk by design, so the warning meant for a silently
|
|
35
|
+
wrong options plist was calling a delivered build a broken export. It now
|
|
36
|
+
says the build was sent — and it decides by reading the plist back rather
|
|
37
|
+
than by trusting the flag, so a hand-written `--options` plist that uploads
|
|
38
|
+
is reported correctly too.
|
|
39
|
+
|
|
9
40
|
## [0.1.5] - 2026-09-21
|
|
10
41
|
|
|
11
42
|
### Added
|
package/dist/src/archive.d.ts
CHANGED
|
@@ -27,7 +27,9 @@ export declare const EXPORT_METHODS: readonly ["app-store-connect", "release-tes
|
|
|
27
27
|
*/
|
|
28
28
|
export declare function exportOptionsPlist(options: {
|
|
29
29
|
method: string;
|
|
30
|
+
destination?: string;
|
|
30
31
|
teamID?: string;
|
|
31
32
|
signingStyle?: string;
|
|
32
33
|
uploadSymbols?: boolean;
|
|
34
|
+
manageAppVersionAndBuildNumber?: boolean;
|
|
33
35
|
}): string;
|
package/dist/src/archive.js
CHANGED
|
@@ -56,6 +56,9 @@ export function exportOptionsPlist(options) {
|
|
|
56
56
|
const entries = [
|
|
57
57
|
` <key>method</key>\n <string>${options.method}</string>`,
|
|
58
58
|
];
|
|
59
|
+
if (options.destination) {
|
|
60
|
+
entries.push(` <key>destination</key>\n <string>${options.destination}</string>`);
|
|
61
|
+
}
|
|
59
62
|
if (options.teamID) {
|
|
60
63
|
entries.push(` <key>teamID</key>\n <string>${options.teamID}</string>`);
|
|
61
64
|
}
|
|
@@ -65,6 +68,9 @@ export function exportOptionsPlist(options) {
|
|
|
65
68
|
if (options.uploadSymbols !== undefined) {
|
|
66
69
|
entries.push(` <key>uploadSymbols</key>\n <${options.uploadSymbols}/>`);
|
|
67
70
|
}
|
|
71
|
+
if (options.manageAppVersionAndBuildNumber !== undefined) {
|
|
72
|
+
entries.push(` <key>manageAppVersionAndBuildNumber</key>\n <${options.manageAppVersionAndBuildNumber}/>`);
|
|
73
|
+
}
|
|
68
74
|
return `<?xml version="1.0" encoding="UTF-8"?>
|
|
69
75
|
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
|
70
76
|
<plist version="1.0">
|
package/dist/src/archive.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"archive.js","sourceRoot":"","sources":["../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Ac,GAAG;IAC5B,mBAAmB;IACnB,iBAAiB;IACjB,YAAY;IACZ,WAAW;IACX,cAAc;IACd,iBAAiB;IACjB,YAAY;CACJ,CAAC;AAEX;;;;;;GAMG;AACH,MAAM,UAAU,kBAAkB,CAAC,OAOlC;IACC,MAAM,OAAO,GAAa;QACxB,kCAAkC,OAAO,CAAC,MAAM,WAAW;KAC5D,CAAC;IACF,IAAI,OAAO,CAAC,WAAW,EAAE,CAAC;QACxB,OAAO,CAAC,IAAI,CACV,uCAAuC,OAAO,CAAC,WAAW,WAAW,CACtE,CAAC;IACJ,CAAC;IACD,IAAI,OAAO,CAAC,MAAM,EAAE,CAAC;QACnB,OAAO,CAAC,IAAI,CAAC,kCAAkC,OAAO,CAAC,MAAM,WAAW,CAAC,CAAC;IAC5E,CAAC;IACD,IAAI,OAAO,CAAC,YAAY,EAAE,CAAC;QACzB,OAAO,CAAC,IAAI,CACV,wCAAwC,OAAO,CAAC,YAAY,WAAW,CACxE,CAAC;IACJ,CAAC;IACD,IAAI,OAAO,CAAC,aAAa,KAAK,SAAS,EAAE,CAAC;QACxC,OAAO,CAAC,IAAI,CAAC,kCAAkC,OAAO,CAAC,aAAa,IAAI,CAAC,CAAC;IAC5E,CAAC;IACD,IAAI,OAAO,CAAC,8BAA8B,KAAK,SAAS,EAAE,CAAC;QACzD,OAAO,CAAC,IAAI,CACV,mDAAmD,OAAO,CAAC,8BAA8B,IAAI,CAC9F,CAAC;IACJ,CAAC;IACD,OAAO;;;;EAIP,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC;;;CAGnB,CAAC;AACF,CAAC"}
|
|
@@ -1,2 +1,14 @@
|
|
|
1
|
+
import { exportOptionsPlist } from "../archive.js";
|
|
1
2
|
export declare const EXPORT_HELP: string;
|
|
3
|
+
export declare const EXPORT_FLAGS: readonly ["--method", "--team", "--options", "--output", "--artifacts-dir", "--upload", "--no-manage-version", "--no-upload-symbols", "--notarized", "--allow-provisioning", "--signing-style", "--auth-key-path", "--auth-key-id", "--auth-key-issuer", "--allow-device-registration"];
|
|
4
|
+
export declare const EXPORT_VALUE_FLAGS: readonly ["--method", "--team", "--options", "--output", "--artifacts-dir", "--signing-style", "--auth-key-path", "--auth-key-id", "--auth-key-issuer"];
|
|
2
5
|
export declare function exportCommand(args: string[]): Promise<string>;
|
|
6
|
+
export declare function generatedPlistOptions(args: string[], method: string): Parameters<typeof exportOptionsPlist>[0];
|
|
7
|
+
/**
|
|
8
|
+
* Does this plist upload rather than write a product?
|
|
9
|
+
*
|
|
10
|
+
* Asked of a hand-written `--options` file too, because the empty-export
|
|
11
|
+
* warning below is wrong in exactly the same way for one of those — and a
|
|
12
|
+
* plist that uploads is the common reason someone brings their own.
|
|
13
|
+
*/
|
|
14
|
+
export declare function plistUploads(contents: string): boolean;
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import { existsSync, mkdtempSync, readdirSync, writeFileSync } from "node:fs";
|
|
1
|
+
import { existsSync, mkdtempSync, readdirSync, readFileSync, writeFileSync, } from "node:fs";
|
|
2
2
|
import { tmpdir } from "node:os";
|
|
3
3
|
import { join, resolve } from "node:path";
|
|
4
4
|
import { AxiError, mapXcodebuildError } from "../errors.js";
|
|
5
5
|
import { EXPORT_METHODS, exportOptionsPlist, readArchiveInfo, } from "../archive.js";
|
|
6
6
|
import { authArgs, AUTH_FLAGS, AUTH_FLAG_HELP, AUTH_VALUE_FLAGS, } from "../auth.js";
|
|
7
|
+
import { artifactsDirFrom } from "../action.js";
|
|
7
8
|
import { requireProject } from "../context.js";
|
|
8
9
|
import { artifactDir, runBuild } from "../xcodebuild.js";
|
|
9
10
|
import { transcriptTail } from "../report.js";
|
|
@@ -11,11 +12,15 @@ import { duration, renderFields, renderHelp, renderOutput, tildePath, } from "..
|
|
|
11
12
|
import { getFlag, hasFlag, positionals, rejectUnknownFlags } from "../args.js";
|
|
12
13
|
export const EXPORT_HELP = `usage: xcodebuild-axi export <path.xcarchive> [flags]
|
|
13
14
|
Exports a built archive into a distributable product.
|
|
14
|
-
flags[
|
|
15
|
+
flags[15]:
|
|
15
16
|
--method <name> ${EXPORT_METHODS.join(", ")}
|
|
16
17
|
--team <id> Developer team ID to sign with
|
|
17
18
|
--options <path> a hand-written export options plist, instead of --method
|
|
18
19
|
--output <path> where to write the export (default: the tool's cache)
|
|
20
|
+
--artifacts-dir <path> where to write this run's log (default: the tool's cache)
|
|
21
|
+
--upload send the build to App Store Connect instead of writing it to disk
|
|
22
|
+
--no-manage-version keep the archive's own version and build number
|
|
23
|
+
--no-upload-symbols do not send dSYMs with the build
|
|
19
24
|
--notarized export an archive Apple has already notarized
|
|
20
25
|
--allow-provisioning let xcodebuild fetch profiles from the developer portal
|
|
21
26
|
--signing-style <name> manual or automatic
|
|
@@ -23,32 +28,42 @@ ${AUTH_FLAG_HELP}
|
|
|
23
28
|
note:
|
|
24
29
|
--method writes the export options plist for you, which is otherwise an XML
|
|
25
30
|
file you have to author by hand. Pass --options to supply your own instead.
|
|
31
|
+
--upload is the difference between an .ipa on disk and a build in App Store
|
|
32
|
+
Connect; with it there are no products to list, which is success, not an
|
|
33
|
+
empty export. --no-manage-version matters whenever the build number is set
|
|
34
|
+
at archive time, because Xcode otherwise picks its own at upload.
|
|
26
35
|
examples:
|
|
27
36
|
xcodebuild-axi export build/MyApp.xcarchive --method release-testing
|
|
28
37
|
xcodebuild-axi export build/MyApp.xcarchive --method app-store-connect --team ABCDE12345
|
|
38
|
+
xcodebuild-axi export build/MyApp.xcarchive --method app-store-connect --upload --no-manage-version
|
|
29
39
|
xcodebuild-axi export build/MyApp.xcarchive --options ExportOptions.plist
|
|
30
40
|
`;
|
|
31
|
-
const
|
|
41
|
+
export const EXPORT_FLAGS = [
|
|
32
42
|
"--method",
|
|
33
43
|
"--team",
|
|
34
44
|
"--options",
|
|
35
45
|
"--output",
|
|
46
|
+
"--artifacts-dir",
|
|
47
|
+
"--upload",
|
|
48
|
+
"--no-manage-version",
|
|
49
|
+
"--no-upload-symbols",
|
|
36
50
|
"--notarized",
|
|
37
51
|
"--allow-provisioning",
|
|
38
52
|
"--signing-style",
|
|
39
53
|
...AUTH_FLAGS,
|
|
40
54
|
];
|
|
41
|
-
const
|
|
55
|
+
export const EXPORT_VALUE_FLAGS = [
|
|
42
56
|
"--method",
|
|
43
57
|
"--team",
|
|
44
58
|
"--options",
|
|
45
59
|
"--output",
|
|
60
|
+
"--artifacts-dir",
|
|
46
61
|
"--signing-style",
|
|
47
62
|
...AUTH_VALUE_FLAGS,
|
|
48
63
|
];
|
|
49
64
|
export async function exportCommand(args) {
|
|
50
|
-
rejectUnknownFlags(args, "export",
|
|
51
|
-
const [rawArchive] = positionals(args,
|
|
65
|
+
rejectUnknownFlags(args, "export", EXPORT_FLAGS, EXPORT_VALUE_FLAGS);
|
|
66
|
+
const [rawArchive] = positionals(args, EXPORT_VALUE_FLAGS);
|
|
52
67
|
if (rawArchive === undefined) {
|
|
53
68
|
throw new AxiError("export needs a path to an .xcarchive", "VALIDATION_ERROR", [
|
|
54
69
|
"xcodebuild-axi export <path.xcarchive> --method release-testing",
|
|
@@ -74,10 +89,24 @@ export async function exportCommand(args) {
|
|
|
74
89
|
!EXPORT_METHODS.includes(method)) {
|
|
75
90
|
throw new AxiError(`Unknown export method '${method}'`, "VALIDATION_ERROR", [`valid methods: ${EXPORT_METHODS.join(", ")}`]);
|
|
76
91
|
}
|
|
92
|
+
const uploading = hasFlag(args, "--upload");
|
|
93
|
+
if (uploading && optionsPath !== undefined) {
|
|
94
|
+
throw new AxiError("--upload has nothing to write to when --options supplies the plist", "VALIDATION_ERROR", [
|
|
95
|
+
"add `<key>destination</key><string>upload</string>` to your own plist",
|
|
96
|
+
"or drop --options and let --method write one",
|
|
97
|
+
]);
|
|
98
|
+
}
|
|
77
99
|
const project = requireProject();
|
|
100
|
+
const artifactsDir = artifactsDirFrom(args);
|
|
78
101
|
const outputPath = getFlag(args, "--output") ??
|
|
79
102
|
join(artifactDir(project), `${basenameOf(archivePath)}-export`);
|
|
80
103
|
const plistPath = optionsPath ?? (method ? writeGeneratedPlist(args, method) : undefined);
|
|
104
|
+
// An upload leaves nothing on disk, so the empty-export warning below would
|
|
105
|
+
// call a successful ship a silently wrong options plist. Read it back rather
|
|
106
|
+
// than trusting the flag: --options supplies a plist this command did not
|
|
107
|
+
// write, and uploading is the usual reason to bring one.
|
|
108
|
+
const sendsToAppStoreConnect = uploading ||
|
|
109
|
+
(plistPath !== undefined && plistUploads(readFileSync(plistPath, "utf8")));
|
|
81
110
|
const run = await runBuild({
|
|
82
111
|
args: [
|
|
83
112
|
notarized ? "-exportNotarizedApp" : "-exportArchive",
|
|
@@ -93,6 +122,7 @@ export async function exportCommand(args) {
|
|
|
93
122
|
],
|
|
94
123
|
label: `${basenameOf(archivePath)}-export`,
|
|
95
124
|
project,
|
|
125
|
+
...(artifactsDir !== undefined ? { outDir: artifactsDir } : {}),
|
|
96
126
|
});
|
|
97
127
|
const succeeded = run.exitCode === 0;
|
|
98
128
|
if (!succeeded) {
|
|
@@ -111,6 +141,7 @@ export async function exportCommand(args) {
|
|
|
111
141
|
export: succeeded ? "succeeded" : "failed",
|
|
112
142
|
archive: tildePath(archivePath),
|
|
113
143
|
...(method ? { method } : {}),
|
|
144
|
+
...(sendsToAppStoreConnect ? { destination: "App Store Connect" } : {}),
|
|
114
145
|
...(info?.bundleIdentifier ? { bundle_id: info.bundleIdentifier } : {}),
|
|
115
146
|
...(info?.marketingVersion ? { version: info.marketingVersion } : {}),
|
|
116
147
|
duration: duration(run.seconds),
|
|
@@ -120,6 +151,11 @@ export async function exportCommand(args) {
|
|
|
120
151
|
blocks.push(renderFields({ products }));
|
|
121
152
|
blocks.push(renderFields({ output: tildePath(outputPath) }));
|
|
122
153
|
}
|
|
154
|
+
else if (succeeded && sendsToAppStoreConnect) {
|
|
155
|
+
// Nothing on disk is the whole point here, so saying "0 files written"
|
|
156
|
+
// would report a delivered build as a broken one.
|
|
157
|
+
blocks.push(renderFields({ uploaded: "the build was sent, not written" }));
|
|
158
|
+
}
|
|
123
159
|
else if (succeeded) {
|
|
124
160
|
// Exit zero with an empty export directory is the shape a silently wrong
|
|
125
161
|
// options plist produces; say so rather than implying a product exists.
|
|
@@ -139,18 +175,36 @@ export async function exportCommand(args) {
|
|
|
139
175
|
}
|
|
140
176
|
return renderOutput(blocks);
|
|
141
177
|
}
|
|
142
|
-
function
|
|
143
|
-
const dir = mkdtempSync(join(tmpdir(), "xcodebuild-axi-export-"));
|
|
144
|
-
const path = join(dir, "ExportOptions.plist");
|
|
178
|
+
export function generatedPlistOptions(args, method) {
|
|
145
179
|
const team = getFlag(args, "--team");
|
|
146
180
|
const signingStyle = getFlag(args, "--signing-style");
|
|
147
|
-
|
|
181
|
+
return {
|
|
148
182
|
method,
|
|
183
|
+
...(hasFlag(args, "--upload") ? { destination: "upload" } : {}),
|
|
149
184
|
...(team !== undefined ? { teamID: team } : {}),
|
|
150
185
|
...(signingStyle !== undefined ? { signingStyle } : {}),
|
|
151
|
-
|
|
186
|
+
...(hasFlag(args, "--no-upload-symbols") ? { uploadSymbols: false } : {}),
|
|
187
|
+
...(hasFlag(args, "--no-manage-version")
|
|
188
|
+
? { manageAppVersionAndBuildNumber: false }
|
|
189
|
+
: {}),
|
|
190
|
+
};
|
|
191
|
+
}
|
|
192
|
+
function writeGeneratedPlist(args, method) {
|
|
193
|
+
const dir = mkdtempSync(join(tmpdir(), "xcodebuild-axi-export-"));
|
|
194
|
+
const path = join(dir, "ExportOptions.plist");
|
|
195
|
+
writeFileSync(path, exportOptionsPlist(generatedPlistOptions(args, method)));
|
|
152
196
|
return path;
|
|
153
197
|
}
|
|
198
|
+
/**
|
|
199
|
+
* Does this plist upload rather than write a product?
|
|
200
|
+
*
|
|
201
|
+
* Asked of a hand-written `--options` file too, because the empty-export
|
|
202
|
+
* warning below is wrong in exactly the same way for one of those — and a
|
|
203
|
+
* plist that uploads is the common reason someone brings their own.
|
|
204
|
+
*/
|
|
205
|
+
export function plistUploads(contents) {
|
|
206
|
+
return /<key>\s*destination\s*<\/key>\s*<string>\s*upload\s*<\/string>/i.test(contents);
|
|
207
|
+
}
|
|
154
208
|
function listProducts(outputPath) {
|
|
155
209
|
try {
|
|
156
210
|
return readdirSync(outputPath).filter((entry) => !entry.startsWith("."));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"export.js","sourceRoot":"","sources":["../../../src/commands/export.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"export.js","sourceRoot":"","sources":["../../../src/commands/export.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,UAAU,EACV,WAAW,EACX,WAAW,EACX,YAAY,EACZ,aAAa,GACd,MAAM,SAAS,CAAC;AACjB,OAAO,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AACjC,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAC1C,OAAO,EAAE,QAAQ,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AAC5D,OAAO,EACL,cAAc,EACd,kBAAkB,EAClB,eAAe,GAChB,MAAM,eAAe,CAAC;AACvB,OAAO,EACL,QAAQ,EACR,UAAU,EACV,cAAc,EACd,gBAAgB,GACjB,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAChD,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAC/C,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AACzD,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAC9C,OAAO,EACL,QAAQ,EACR,YAAY,EACZ,UAAU,EACV,YAAY,EACZ,SAAS,GACV,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,WAAW,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC;AAE/E,MAAM,CAAC,MAAM,WAAW,GAAG;;;4BAGC,cAAc,CAAC,IAAI,CAAC,IAAI,CAAC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