Skip to content

fix: update amplify.yml file with the gen2 command#14136

Merged
abhi7cr merged 4 commits intoaws-amplify:migrationsfrom
bzsurbhi:migrations
Mar 19, 2025
Merged

fix: update amplify.yml file with the gen2 command#14136
abhi7cr merged 4 commits intoaws-amplify:migrationsfrom
bzsurbhi:migrations

Conversation

@bzsurbhi
Copy link
Copy Markdown

Description of changes

If amplify.yml does not exist at the root of their project, get the buildSpec by making the getApp call, update the Gen1 command and create amplify.yml file with the updated buildspec
if amplify.yml exists at the root, update the buildspec by replacing Gen1 command to Gen2 command
Gen1 command: amplifyPush --simple
Gen2 command: npx ampx pipeline-deploy

Issue #, if available

https://app.asana.com/0/1209548398662247/1209172037882456

Description of how you validated changes

Checklist

  • PR description included
  • yarn test passes
  • Tests are changed or added
  • Relevant documentation is changed or added (and PR referenced)
  • New AWS SDK calls or CloudFormation actions have been added to relevant test and service IAM policies
  • Pull request labels are added

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@bzsurbhi bzsurbhi requested review from a team as code owners March 13, 2025 18:38
Comment thread packages/amplify-migration/src/command-handlers.ts Outdated
Comment thread packages/amplify-migration/src/command-handlers.ts Outdated
Comment thread packages/amplify-migration/src/command-handlers.ts Fixed
Comment thread packages/amplify-migration/src/command-handlers.ts Outdated

const amplifyMeta = (await this.readJsonFile(amplifyMetaPath)) ?? {};

if ('api' in amplifyMeta && Object.keys(amplifyMeta.api).length) {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

nit: > 0

@abhi7cr abhi7cr merged commit d4ba56a into aws-amplify:migrations Mar 19, 2025
5 checks passed
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.

3 participants