Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit eafd0fc

Browse files
committedJan 31, 2025··
m
1 parent 6453101 commit eafd0fc

File tree

4 files changed

+26
-5
lines changed

4 files changed

+26
-5
lines changed
 

‎DynamoDbEncryption/runtimes/rust/RELEASE.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
To publish a new version of the aws-db-esdk for version N.N.N
22

3-
1. Acquire the appropriate permissions
43
1. Ensure git checkout of main is fresh and clean
54
1. ./start_release.sh N.N.N
65
1. `cd ../../../releases/rust/db_esdk`

‎DynamoDbEncryption/runtimes/rust/start_release.sh

Lines changed: 24 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,19 @@ if [ $MATCHES -eq 0 ]; then
1717
exit 1
1818
fi
1919

20+
# assume role to allow tests to run
21+
mwinit -f
22+
unset AWS_ACCESS_KEY_ID AWS_SECRET_ACCESS_KEY AWS_SESSION_TOKEN AWS_PROFILE
23+
_assume_role="arn:aws:iam::370957321024:role/GitHub-CI-DDBEC-Dafny-Role-us-west-2"
24+
_session_name="${USER}-DDBEC-Dafny-Java-Tests"
25+
export AWS_PROFILE=aws-crypto-tools-team+optools-ci-ToolsDevelopment
26+
export AWS_REGION=us-west-2
27+
STS_RESPONSE=`aws sts assume-role --role-arn $_assume_role --role-session-name $_session_name`
28+
export AWS_ACCESS_KEY_ID=`echo "$STS_RESPONSE" | jq -r .Credentials.AccessKeyId`
29+
export AWS_SECRET_ACCESS_KEY=`echo "$STS_RESPONSE" | jq -r .Credentials.SecretAccessKey`
30+
export AWS_SESSION_TOKEN=`echo "$STS_RESPONSE" | jq -r .Credentials.SessionToken`
31+
unset AWS_PROFILE AWS_SDK_LOAD_CONFIG _assume_role _session_name STS_RESPONSE
32+
2033
# Update the version in Cargo.toml
2134
perl -pe "s/^version = .*$/version = \"$1\"/" < Cargo.toml > new_Cargo.toml
2235
mv new_Cargo.toml Cargo.toml
@@ -26,7 +39,7 @@ find src -depth 1 | egrep -v '(intercept.rs|lib.rs|software_externs.rs|README)'
2639

2740
# Change to the parent directory and run make polymorph and transpile commands
2841
cd ../..
29-
make polymorph_rust transpile_rust test_rust
42+
make polymorph_rust transpile_rust test_rust test_rust_debug
3043

3144
# Remove target directory
3245
cd runtimes/rust
@@ -43,13 +56,22 @@ cd ../../../releases/rust/db_esdk
4356
git checkout dafny_runtime_rust
4457

4558
# Remove unnecessary files and directories
46-
rm -rf *~ copy_externs.sh start_release.sh test_published.sh test_examples *.pem RELEASE.md src/README.md
59+
rm -rf *~ copy_externs.sh upgrade_examples.sh start_release.sh test_published.sh test_examples *.pem RELEASE.md src/README.md
4760

4861
# Create .gitignore file with specified entries
4962
echo Cargo.lock > .gitignore
5063
echo target >> .gitignore
5164

65+
# format the generated code
66+
cargo fmt
67+
68+
# replace local path with latest dafny-runtime from crates.io
69+
cargo rm dafny-runtime
70+
cargo add dafny-runtime -F sync
71+
5272
# Run cargo test and example tests
73+
cargo test --release
74+
cargo run --release --example main
5375
cargo test
5476
cargo run --example main
5577

‎submodules/smithy-dafny

0 commit comments

Comments
 (0)
Please sign in to comment.