-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: create Rust release runbook (#1488)
* chore: automate release
- Loading branch information
1 parent
67f3d2e
commit e51f340
Showing
7 changed files
with
104 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
To publish a new version of the aws-db-esdk for version N.N.N | ||
|
||
1. Acquire the appropriate permissions | ||
1. Ensure git checkout of main is fresh and clean | ||
1. ./start_release.sh N.N.N | ||
1. cd ../../../releases/rust/db_esdk | ||
1. Create a PR with all changed or added files | ||
1. cargo publish | ||
1. cd ../../../DynamoDbEncryption/runtimes/rust/ # i.e. return here | ||
1. ./test_published.sh N.N.N |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
#!/bin/bash -eu | ||
|
||
if [ "$#" -ne 1 ]; then | ||
echo 1>&2 "USAGE: start_release.sh N.N.N" | ||
exit 1 | ||
fi | ||
|
||
cd $( dirname ${BASH_SOURCE[0]} ) | ||
|
||
REGEX_VERSION='^\d+\.\d+\.\d+$' | ||
MATCHES=$(echo "$1" | egrep $REGEX_VERSION | wc -l) | ||
if [ $MATCHES -eq 0 ]; then | ||
echo 1>&2 "Version \"$1\" must be N.N.N" | ||
exit 1 | ||
fi | ||
|
||
perl -pe "s/^version = .*$/version = \"$1\"/" < Cargo.toml > new_Cargo.toml | ||
mv new_Cargo.toml Cargo.toml | ||
|
||
find src -depth 1 | egrep -v '(intercept.rs|lib.rs|software_externs.rs)' | xargs rm -rf | ||
cd ../.. | ||
make polymorph_rust transpile_rust test_rust | ||
cd runtimes/rust | ||
rm -rf target | ||
rm -rf ../../../releases/rust/db_esdk | ||
cp -r . ../../../releases/rust/db_esdk | ||
cd ../../../releases/rust/db_esdk | ||
git checkout dafny_runtime_rust | ||
rm -rf *~ copy_externs.sh start_release.sh test_published.sh test_examples *.pem RELEASE.md | ||
echo Cargo.lock > .gitignore | ||
echo target >> .gitignore | ||
|
||
cargo test | ||
cargo run --example main | ||
rm -f Cargo.lock *.pem | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
*~ | ||
*.pem | ||
src |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
[package] | ||
name = "aws-db-esdk-examples" | ||
version = "0.1.0" | ||
edition = "2021" | ||
rust-version = "1.80.0" | ||
|
||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html | ||
|
||
[dependencies] | ||
aws-config = "1.5.10" | ||
aws-lc-rs = "1.11.1" | ||
aws-lc-sys = "0.23.1" | ||
aws-sdk-dynamodb = "1.54.0" | ||
aws-sdk-kms = "1.50.0" | ||
aws-smithy-runtime-api = {version = "1.7.3", features = ["client"] } | ||
aws-smithy-types = "1.2.9" | ||
chrono = "0.4.38" | ||
dafny-runtime = "0.1.1" | ||
dashmap = "6.1.0" | ||
pem = "3.0.4" | ||
tokio = {version = "1.41.1", features = ["full"] } | ||
uuid = { version = "1.11.0", features = ["v4"] } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
#!/bin/bash -eu | ||
|
||
if [ "$#" -ne 1 ]; then | ||
echo 1>&2 "USAGE: test_published.sh N.N.N" | ||
exit 1 | ||
fi | ||
|
||
cd $( dirname ${BASH_SOURCE[0]} ) | ||
|
||
REGEX_VERSION='^\d+\.\d+\.\d+$' | ||
|
||
echo "$1" | egrep -q $REGEX_VERSION | ||
if [ $? -ne 0 ]; then | ||
echo 1>&2 "Version \"$1\" must be N.N.N" | ||
exit 1 | ||
fi | ||
|
||
VERSION=$1 | ||
|
||
rm -rf test_examples/src | ||
cp -r examples test_examples/src/ | ||
cd test_examples | ||
cargo add aws-db-esdk | ||
MATCH=$(fgrep "aws-db-esdk = \"$VERSION\"" Cargo.toml | wc -l) | ||
if [ $MATCH -eq "0" ]; then | ||
echo Version $VERSION of aws-db-esdk not the most recent | ||
egrep '^aws-db-esdk' Cargo.toml | ||
exit 1 | ||
fi | ||
cargo run |
This file was deleted.
Oops, something went wrong.