feat(create-medusa-app): remove --stable option and change to clone default branch (#4794)
This commit is contained in:
@@ -9,7 +9,6 @@ type CloneRepoOptions = {
|
||||
directoryName?: string
|
||||
repoUrl?: string
|
||||
abortController?: AbortController
|
||||
stable?: boolean
|
||||
}
|
||||
|
||||
const DEFAULT_REPO = "https://github.com/medusajs/medusa-starter-default"
|
||||
@@ -18,14 +17,10 @@ export default async function cloneRepo({
|
||||
directoryName = "",
|
||||
repoUrl,
|
||||
abortController,
|
||||
stable = false,
|
||||
}: CloneRepoOptions) {
|
||||
await promiseExec(
|
||||
`git clone ${repoUrl || getRepoUrl(stable)} ${directoryName}`,
|
||||
{
|
||||
signal: abortController?.signal,
|
||||
}
|
||||
)
|
||||
await promiseExec(`git clone ${repoUrl || DEFAULT_REPO} ${directoryName}`, {
|
||||
signal: abortController?.signal,
|
||||
})
|
||||
}
|
||||
|
||||
export async function runCloneRepo({
|
||||
@@ -33,20 +28,17 @@ export async function runCloneRepo({
|
||||
repoUrl,
|
||||
abortController,
|
||||
spinner,
|
||||
stable = false,
|
||||
}: {
|
||||
projectName: string
|
||||
repoUrl: string
|
||||
abortController: AbortController
|
||||
spinner: Ora
|
||||
stable?: boolean
|
||||
}) {
|
||||
try {
|
||||
await cloneRepo({
|
||||
directoryName: projectName,
|
||||
repoUrl,
|
||||
abortController,
|
||||
stable,
|
||||
})
|
||||
|
||||
deleteGitDirectory(projectName)
|
||||
@@ -69,7 +61,3 @@ function deleteGitDirectory(projectDirectory: string) {
|
||||
force: true,
|
||||
})
|
||||
}
|
||||
|
||||
function getRepoUrl(stable?: boolean) {
|
||||
return !stable ? `${DEFAULT_REPO} -b feat/onboarding` : DEFAULT_REPO
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user