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

Hydrogen CLI's env push command is released #1946

Merged
merged 6 commits into from
Apr 9, 2024
Merged

Hydrogen CLI's env push command is released #1946

merged 6 commits into from
Apr 9, 2024

Conversation

aswamy
Copy link
Contributor

@aswamy aswamy commented Apr 5, 2024

WHY are these changes introduced?

  • We are ready to release the env push command for the Hydrogen CLI
  • We need to update the cli-kit and oclif to support multiline env vars in the .env file

WHAT is this pull request doing?

  • Hydrogen CLI's env push command is the counterpart for the env pull command. It is used to push environment variables found in the .env file to Admin. Refer to docs for full usage details.
  • Updated internal libraries for parsing .env file.

HOW to test your changes?

  1. checkout code
  2. npm ci && cd packages/cli && npm run build
  3. npx shopify hydrogen env push --path=/path/to/repo (if you don't have a repo, create it using the npx shopify hydrogen init` command)

image

Post-merge steps

Checklist

  • I've read the Contributing Guidelines
  • I've considered possible cross-platform impacts (Mac, Linux, Windows)
  • I've added a changeset if this PR contains user-facing or noteworthy changes
  • I've added tests to cover my changes
  • I've added or updated the documentation

- Hydrogen CLI's `env push` command is the counterpart for the `env pull` command. It is used to push environment variables found in the `.env` file to Admin. Refer to [docs](https://shopify.dev/docs/custom-storefronts/hydrogen/cli) for full usage details.
- Updated internal libraries for parsing `.env` file.
@aswamy aswamy requested review from frandiox, benwolfram and a team April 5, 2024 19:07
"@shopify/hydrogen-codegen": "^0.2.2",
"@shopify/oxygen-cli": "4.3.6",
"@shopify/oxygen-cli": "~4.4.0",
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@wizardlyhel Could i allow patch updates to the oxygen-cli? Or should i keep the version locked?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be fine 👍

Copy link
Contributor

shopify bot commented Apr 8, 2024

Oxygen deployed a preview of your update-oxygen-cli branch. Details:

Storefront Status Preview link Deployment details Last update (UTC)
vite ✅ Successful (Logs) Preview deployment Inspect deployment April 9, 2024 8:53 PM
custom-cart-method ✅ Successful (Logs) Preview deployment Inspect deployment April 9, 2024 8:54 PM
subscriptions ✅ Successful (Logs) Preview deployment Inspect deployment April 9, 2024 8:54 PM
third-party-queries-caching ✅ Successful (Logs) Preview deployment Inspect deployment April 9, 2024 8:53 PM
optimistic-cart-ui ✅ Successful (Logs) Preview deployment Inspect deployment April 9, 2024 8:53 PM
skeleton ✅ Successful (Logs) Preview deployment Inspect deployment April 9, 2024 8:53 PM

Learn more about Hydrogen's GitHub integration.

Copy link
Contributor

@frandiox frandiox left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

I've fixed these issues:

  • Update our CLI dependencies in our templates to be in sync with the new cli-kit version
  • Fix unit test error related to changes in cli-kit
  • Fixed package-lock.json duplicating dependencies in some workspace packages
  • Updated the Oclif manifest with Fix command order in Oclif manifest #1949 to avoid conflicts.

Copy link
Contributor

@benwolfram benwolfram left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code looks good, but having trouble building this locally.

Let's pair quick tomorrow maybe

image

@frandiox
Copy link
Contributor

frandiox commented Apr 8, 2024

@benwolfram you probably just need to build the other packages first. Try npm run build:pkg -- --force at the root.

@benwolfram
Copy link
Contributor

@frandiox I am getting ERROR run failed: io error: Operation not supported on socket (os error 102) when trying to run build or build:pkg 😞

@juanpprieto
Copy link
Contributor

juanpprieto commented Apr 9, 2024

Worked great for me

Screenshot 2024-04-09 at 8 59 16 AM Screenshot 2024-04-09 at 9 00 43 AM

@juanpprieto juanpprieto closed this Apr 9, 2024
@juanpprieto juanpprieto reopened this Apr 9, 2024
Copy link
Contributor

@juanpprieto juanpprieto left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💯 💯 💯

Copy link
Contributor

@benwolfram benwolfram left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Got tophat going and looks good!

@aswamy aswamy force-pushed the update-oxygen-cli branch 4 times, most recently from 06154dc to 6f81191 Compare April 9, 2024 20:43
@aswamy aswamy merged commit 4eaec27 into main Apr 9, 2024
18 of 19 checks passed
@aswamy aswamy deleted the update-oxygen-cli branch April 9, 2024 21:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants