Skip to content

Commit e95f895

Browse files
authored
Merge pull request #63 from appcircleio/feature/be-6103
#BE-6103 feat: enhance build command with status monitoring and log downloading
2 parents 4bfb0cc + 5aa6f84 commit e95f895

4 files changed

Lines changed: 434 additions & 20 deletions

File tree

README.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,26 @@ CURL_LOGGING= appcircle
157157
- Get the workflows of that build profile `appcircle build profile workflows --profileId="YOUR PROFILE ID"`
158158
- Start a new build using `appcircle build start --profileId="YOUR PROFILE ID" --branch="YOUR BRANCH" --workflow="YOUR WORKFLOW ID"`
159159

160+
#### Build Log Download Improvements
161+
162+
Appcircle CLI includes the following improvements for build log downloading functionality:
163+
164+
- Build logs are automatically downloaded when a build is completed
165+
- A 2-minute waiting period with 5-second retry intervals is implemented for log files
166+
- User-friendly animation is displayed: "Waiting for build logs to be prepared..."
167+
- Support for manual log download with both task ID (`--taskId`) and commit/build ID (`--commitId`/`--buildId`) parameters
168+
- Automatic fallback to alternative download methods when the primary method fails
169+
- Log files are saved with descriptive filenames: `build-task-{taskId}-log.txt`
170+
171+
To download build logs:
172+
```shell
173+
# Download using Task ID (preferred method)
174+
appcircle build download-log --taskId="YOUR_TASK_ID"
175+
176+
# Download using Commit ID and Build ID (alternative method)
177+
appcircle build download-log --commitId="YOUR_COMMIT_ID" --buildId="YOUR_BUILD_ID"
178+
```
179+
160180
### Distributing an App via the Appcircle CLI
161181

162182
- Create a distribution profile and [share with the testers](https://docs.appcircle.io/distribute/create-or-select-a-distribution-profile)

docs/build/download-log.md

Lines changed: 36 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,54 @@
11
# `appcircle build download-log`
22

3-
Download build log to the given directory on your machine.
3+
Download build logs to the specified directory.
44

55
```plaintext
66
appcircle build download-log [options]
77
```
88

9+
## Description
10+
11+
This command downloads build logs to your computer. You can download logs using two different methods:
12+
13+
1. Using `taskId` (preferred method)
14+
2. Using `commitId` and `buildId` (alternative method)
15+
16+
When downloading logs, the CLI automatically checks if logs are ready at 5-second intervals for up to 2 minutes.
17+
918
## Options
1019

1120
```plaintext
12-
--path <string> [OPTIONAL] The path for log to be downloaded. Defaults to the current directory
21+
--path <string> [OPTIONAL] Path where logs will be downloaded. Defaults to current directory or Downloads folder
1322
14-
--commitId <uuid> Commit ID of your build
23+
--taskId <uuid> [METHOD 1] Task ID for the build process
1524
16-
--buildId <uuid> Build ID
25+
--commitId <uuid> [METHOD 2] Commit ID
26+
27+
--buildId <uuid> [METHOD 2] Build ID
1728
```
29+
30+
## Features
31+
32+
- User-friendly animation is displayed while build logs are being prepared
33+
- Automatically switches to alternative download methods if the primary method fails
34+
- Logs are saved with descriptive filenames: `build-task-{taskId}-log.txt` or `{buildId}-log.txt`
35+
- Full file path is displayed to easily find log files
36+
1837
## Options inherited from parent commands
1938

2039
```plaintext
2140
--help Show help for command
41+
```
42+
43+
## Examples
44+
45+
```plaintext
46+
# Download logs using Task ID (preferred method)
47+
appcircle build download-log --taskId="1a2b3c4d-5e6f-7g8h-9i0j-1k2l3m4n5o6p"
48+
49+
# Download logs using Commit ID and Build ID
50+
appcircle build download-log --commitId="1a2b3c4d-5e6f-7g8h-9i0j-1k2l3m4n5o6p" --buildId="7q8r9s0t-1u2v-3w4x-5y6z-7a8b9c0d1e2f"
51+
52+
# Download to a specific directory
53+
appcircle build download-log --taskId="1a2b3c4d-5e6f-7g8h-9i0j-1k2l3m4n5o6p" --path="/Users/username/Downloads"
2254
```

0 commit comments

Comments
 (0)