Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chore/update ci target repo #9735

Draft
wants to merge 2 commits into
base: develop
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/angry-tips-deny.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@medusajs/cli": patch
---

Replace reference to old CLI package with new
2 changes: 1 addition & 1 deletion .github/workflows/test-cli-with-database.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ jobs:

- name: Create Medusa project
run: |
medusa new cli-test --skip-db --v2 --branch feat/v2-ci
medusa new cli-test --skip-db --branch ci
working-directory: ..

- name: run medusa dev
Expand Down
11 changes: 5 additions & 6 deletions packages/cli/medusa-cli/src/commands/new.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,17 @@
* Adapted from https://github.com/gatsbyjs/gatsby/blob/master/packages/gatsby-cli/src/init-starter.ts
*/

import { track } from "@medusajs/telemetry"
import { execSync } from "child_process"
import execa from "execa"
import { sync as existsSync } from "fs-exists-cached"
import fs from "fs-extra"
import hostedGitInfo from "hosted-git-info"
import isValid from "is-valid-path"
import sysPath from "path"
import path from "path"
import prompts from "prompts"
import { default as path, default as sysPath } from "path"
import { Pool } from "pg"
import prompts from "prompts"
import url from "url"
import { track } from "@medusajs/telemetry"
// @ts-ignore
import inquirer from "inquirer"
import { createDatabase } from "pg-god"
Expand Down Expand Up @@ -443,11 +442,11 @@ const runMigrations = async (rootPath) => {
const cliPath = sysPath.join(
`node_modules`,
`@medusajs`,
`medusa-cli`,
`cli`,
`cli.js`
)

return await execa(cliPath, [`migrations`, `run`], {
return await execa(cliPath, [`db:migrate`], {
cwd: rootPath,
})
.then(() => {
Expand Down
Loading