Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
Smithy Rust
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Public Repositories
Smithy Rust
Commits
3aa4cc24
Unverified
Commit
3aa4cc24
authored
2 years ago
by
Burak
Committed by
GitHub
2 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Execute Python's diff commands inside correct directory (#2568)
parent
1e27efe0
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
tools/ci-scripts/codegen-diff/codegen-diff-revisions.py
+1
-1
1 addition, 1 deletion
tools/ci-scripts/codegen-diff/codegen-diff-revisions.py
tools/ci-scripts/codegen-diff/diff_lib.py
+5
-3
5 additions, 3 deletions
tools/ci-scripts/codegen-diff/diff_lib.py
with
6 additions
and
4 deletions
tools/ci-scripts/codegen-diff/codegen-diff-revisions.py
+
1
−
1
View file @
3aa4cc24
...
...
@@ -20,7 +20,7 @@ from diff_lib import eprint, run, get_cmd_status, get_cmd_output, generate_and_c
#
# ```
# $ cd test/smithy-rs
# $ ../../smithy-rs/tools/ci-scripts/codegen-diff-revisions.py . <some commit hash to diff against>
# $ ../../smithy-rs/tools/ci-scripts/codegen-diff
/codegen-diff
-revisions.py . <some commit hash to diff against>
# ```
#
# It will diff the generated code from HEAD against any commit hash you feed it. If you want to test
...
...
This diff is collapsed.
Click to expand it.
tools/ci-scripts/codegen-diff/diff_lib.py
+
5
−
3
View file @
3aa4cc24
...
...
@@ -15,6 +15,8 @@ COMMIT_AUTHOR_EMAIL = "generated-code-action@github.com"
CDN_URL
=
"
https://d2luzm2xt3nokh.cloudfront.net
"
PYTHON_EXAMPLES_PATH
=
"
rust-runtime/aws-smithy-http-server-python/examples
"
target_codegen_client
=
'
codegen-client-test
'
target_codegen_server
=
'
codegen-server-test
'
target_aws_sdk
=
'
aws:sdk
'
...
...
@@ -40,14 +42,14 @@ def generate_and_commit_generated_code(revision_sha, targets=None):
# Clean the build artifacts before continuing
get_cmd_output
(
"
rm -rf aws/sdk/build
"
)
if
target_codegen_server
in
targets
:
get_cmd_output
(
"
cd rust-runtime/aws-smithy-http-server-python/examples &&
make distclean
"
,
shell
=
True
)
get_cmd_output
(
"
make distclean
"
,
shell
=
True
,
cwd
=
PYTHON_EXAMPLES_PATH
)
get_cmd_output
(
"
./gradlew codegen-core:clean codegen-client:clean codegen-server:clean aws:sdk-codegen:clean
"
)
# Generate code
tasks
=
'
'
.
join
([
f
'
{
t
}
:assemble
'
for
t
in
targets
])
get_cmd_output
(
f
"
./gradlew --rerun-tasks
{
tasks
}
"
)
if
target_codegen_server
in
targets
:
get_cmd_output
(
"
cd rust-runtime/aws-smithy-http-server-python/examples &&
make build
"
,
shell
=
True
,
check
=
False
)
get_cmd_output
(
"
make build
"
,
shell
=
True
,
check
=
False
,
cwd
=
PYTHON_EXAMPLES_PATH
)
get_cmd_output
(
f
"
./gradlew --rerun-tasks codegen-server-test:typescript:assemble
"
)
# Move generated code into codegen-diff/ directory
...
...
@@ -60,7 +62,7 @@ def generate_and_commit_generated_code(revision_sha, targets=None):
get_cmd_output
(
f
"
mv
{
target
}
/build/smithyprojections/
{
target
}
{
OUTPUT_PATH
}
/
"
)
if
target
==
target_codegen_server
:
get_cmd_output
(
f
"
mv
rust-runtime/aws-smithy-http-server-python/examples
/pokemon-service-server-sdk/
{
OUTPUT_PATH
}
/codegen-server-test-python/
"
,
f
"
mv
{
PYTHON_EXAMPLES_PATH
}
/pokemon-service-server-sdk/
{
OUTPUT_PATH
}
/codegen-server-test-python/
"
,
check
=
False
)
get_cmd_output
(
f
"
mv codegen-server-test/typescript/build/smithyprojections/codegen-server-test-typescript
{
OUTPUT_PATH
}
/
"
,
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment