Skip to content

Commit 64b1a64

Browse files
committed
revert: use current branch over "dev" default
1 parent e7a4de4 commit 64b1a64

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

src/scripts/crowdin/translations/constants.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,3 @@ export const BUCKETS_IMPORTED_FILE = "buckets-imported.json"
1313
export const BUCKETS_PATH = resolve(CROWDIN_DATA_DIR, BUCKETS_IMPORTED_FILE)
1414

1515
export const APPROVAL_THRESHOLD = 100
16-
17-
export const STARTING_BRANCH = "dev"

src/scripts/crowdin/translations/utils.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import decompress from "decompress"
99

1010
import { INTL_JSON_DIR, TRANSLATIONS_DIR } from "../../../lib/constants"
1111

12-
import { STARTING_BRANCH, SUMMARY_PATH } from "./constants"
12+
import { SUMMARY_PATH } from "./constants"
1313
import { QASummary } from "./types"
1414

1515
export const downloadFile = async (url: string, writePath: string) => {
@@ -72,7 +72,9 @@ export const processLocale = (locale: string, buckets: number[]) => {
7272

7373
const branchName = `${month}-${locale}-${timestamp}`
7474
const message = `chore: import translations for ${locale}`
75-
75+
const startingBranch = execSync("git branch --show-current", {
76+
encoding: "utf-8",
77+
}).trim()
7678
execSync(`git checkout -b ${branchName}`)
7779
execSync("git reset .")
7880
execSync(`git add ${TRANSLATIONS_DIR}/${locale}`)
@@ -123,5 +125,5 @@ export const processLocale = (locale: string, buckets: number[]) => {
123125

124126
unlinkSync(bodyWritePath)
125127

126-
execSync(`git checkout ${STARTING_BRANCH}`)
128+
execSync(`git checkout ${startingBranch}`)
127129
}

0 commit comments

Comments
 (0)