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(scripts): build smithy-typescript from specific commit during codegen #5139

Merged
merged 4 commits into from
Aug 24, 2023

Conversation

trivikr
Copy link
Member

@trivikr trivikr commented Aug 24, 2023

Issue

Internal JS-4624

Description

Add ability to build smithy-typescript codegen from specific commit.

Testing

smithy-typescript directory

The smithy-typescript is checked out in sibling folder

$ aws-sdk-js-v3> rm -rf ~/.m2/repository

$ aws-sdk-js-v3> [ -d ../smithy-typescript ] && echo "Yes" || echo "No"
Yes

$ aws-sdk-js-v3> yarn generate-clients -g codegen/sdk-codegen/aws-models/acm.json -n
...
Done in 18.86s.

$ aws-sdk-js-v3> git status
On branch publish-smithy-ts-before-codegen
Your branch is up to date with 'origin/publish-smithy-ts-before-codegen'.

nothing to commit, working tree clean

The smithy-typescript is not checked out in sibling folder

$ aws-sdk-js-v3> rm -rf ~/.m2/repository

$ aws-sdk-js-v3> [ -d ../smithy-typescript ] && echo "Yes" || echo "No"
No

$ aws-sdk-js-v3> yarn generate-clients -g codegen/sdk-codegen/aws-models/acm.json -n
...
Done in 20.77s.

$ aws-sdk-js-v3> [ -d ../smithy-typescript ] && echo "Yes" || echo "No"
No

$ aws-sdk-js-v3> git status
On branch publish-smithy-ts-before-codegen
Your branch is up to date with 'origin/publish-smithy-ts-before-codegen'.

nothing to commit, working tree clean

Provide specific folder to check out smithy-typescript in

$ aws-sdk-js-v3> rm -rf ~/.m2/repository

$ aws-sdk-js-v3> [ -d ../smithy-ts ] && echo "Yes" || echo "No"
No

$ aws-sdk-js-v3> yarn generate-clients -g codegen/sdk-codegen/aws-models/acm.json -n -r ../smithy-ts
...
Done in 19.68s

$ aws-sdk-js-v3> [ -d ../smithy-ts ] && echo "Yes" || echo "No"
No

$ aws-sdk-js-v3> git status
On branch publish-smithy-ts-before-codegen
Your branch is up to date with 'origin/publish-smithy-ts-before-codegen'.

nothing to commit, working tree clean

smithy-typescript commit

$ aws-sdk-js-v3> yarn generate-clients -g codegen/sdk-codegen/aws-models/acm.json -n -c 8f6e5a31
...
Done in 18.32s.

# Undo changes in https://github.com/awslabs/smithy-typescript/pull/889
$ aws-sdk-js-v3> git status
On branch publish-smithy-ts-before-codegen
Your branch is up to date with 'origin/publish-smithy-ts-before-codegen'.

Changes not staged for commit:
  (use "git add/rm <file>..." to update what will be committed)
  (use "git restore <file>..." to discard changes in working directory)
        deleted:    clients/client-acm/src/extensionConfiguration.ts
        modified:   clients/client-acm/src/runtimeExtensions.ts

Untracked files:
  (use "git add <file>..." to include in what will be committed)
        clients/client-acm/src/clientConfiguration.ts

no changes added to commit (use "git add" and/or "git commit -a")

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@trivikr trivikr marked this pull request as ready for review August 24, 2023 00:28
@trivikr trivikr requested a review from a team as a code owner August 24, 2023 00:28
Copy link
Contributor

@syall syall left a comment

Choose a reason for hiding this comment

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

Looks good, found a typo.

scripts/generate-clients/index.js Outdated Show resolved Hide resolved
Co-authored-by: Steven Yuan <s.yuan.all@gmail.com>
@trivikr trivikr merged commit 4c4bf11 into aws:main Aug 24, 2023
2 checks passed
@trivikr trivikr deleted the publish-smithy-ts-before-codegen branch August 24, 2023 19:16
@github-actions
Copy link

github-actions bot commented Sep 8, 2023

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs and link to relevant comments in this thread.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 8, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants