gtx-cli 2.6.11 → 2.6.12
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
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# gtx-cli
|
|
2
2
|
|
|
3
|
+
## 2.6.12
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#992](https://github.com/generaltranslation/gt/pull/992) [`776a12f`](https://github.com/generaltranslation/gt/commit/776a12f5ac2fbc3bb832d96ca337fcbadbf1fd49) Thanks [@brian-lou](https://github.com/brian-lou)! - Enable branching for default; graceful fallback
|
|
8
|
+
|
|
3
9
|
## 2.6.11
|
|
4
10
|
|
|
5
11
|
### Patch Changes
|
package/dist/cli/flags.js
CHANGED
|
@@ -36,7 +36,8 @@ export function attachTranslateFlags(command) {
|
|
|
36
36
|
.option('--experimental-clear-locale-dirs', 'Clear locale directories before downloading new translations', false)
|
|
37
37
|
.option('--branch <branch>', 'Specify a custom branch to use for translations')
|
|
38
38
|
.option('--disable-branch-detection', 'Disable additional branch detection and optimizations and use the manually specified branch', false)
|
|
39
|
-
.option('--enable-branching', 'Enable branching for the project'
|
|
39
|
+
.option('--enable-branching', 'Enable branching for the project')
|
|
40
|
+
.option('--no-enable-branching', 'Disable branching for the project')
|
|
40
41
|
.option('--remote-name <name>', 'Specify a custom remote name to use for branch detection', DEFAULT_GIT_REMOTE_NAME);
|
|
41
42
|
return command;
|
|
42
43
|
}
|
|
@@ -176,7 +176,7 @@ export async function generateSettings(flags, cwd = process.cwd()) {
|
|
|
176
176
|
// Add branch options if not provided
|
|
177
177
|
const branchOptions = mergedOptions.branchOptions || {};
|
|
178
178
|
branchOptions.enabled =
|
|
179
|
-
flags.enableBranching ?? gtConfig.branchOptions?.enabled ??
|
|
179
|
+
flags.enableBranching ?? gtConfig.branchOptions?.enabled ?? true;
|
|
180
180
|
branchOptions.currentBranch =
|
|
181
181
|
flags.branch ?? gtConfig.branchOptions?.currentBranch ?? undefined;
|
|
182
182
|
branchOptions.autoDetectBranches = flags.disableBranchDetection
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const PACKAGE_VERSION = "2.6.
|
|
1
|
+
export declare const PACKAGE_VERSION = "2.6.12";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// This file is auto-generated. Do not edit manually.
|
|
2
|
-
export const PACKAGE_VERSION = '2.6.
|
|
2
|
+
export const PACKAGE_VERSION = '2.6.12';
|
|
@@ -84,13 +84,15 @@ export class BranchStep extends WorkflowStep {
|
|
|
84
84
|
}
|
|
85
85
|
catch (error) {
|
|
86
86
|
if (error instanceof ApiError && error.code === 403) {
|
|
87
|
-
logger.error('Failed to create branch. To enable branching, please upgrade your plan.');
|
|
88
87
|
// retry with default branch
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
88
|
+
try {
|
|
89
|
+
const createBranchResult = await this.gt.createBranch({
|
|
90
|
+
branchName: 'main', // name doesn't matter for default branch
|
|
91
|
+
defaultBranch: true,
|
|
92
|
+
});
|
|
93
|
+
this.branchData.currentBranch = createBranchResult.branch;
|
|
94
|
+
}
|
|
95
|
+
catch { }
|
|
94
96
|
}
|
|
95
97
|
}
|
|
96
98
|
}
|
|
@@ -98,6 +100,9 @@ export class BranchStep extends WorkflowStep {
|
|
|
98
100
|
this.branchData.currentBranch = currentBranch;
|
|
99
101
|
}
|
|
100
102
|
}
|
|
103
|
+
if (this.branchData.currentBranch.id === '') {
|
|
104
|
+
return logErrorAndExit('Something went wrong while resolving branch information. Please try again.');
|
|
105
|
+
}
|
|
101
106
|
// Now set the incoming and checked out branches (first one that exists)
|
|
102
107
|
this.branchData.incomingBranch =
|
|
103
108
|
incoming
|