-
Notifications
You must be signed in to change notification settings - Fork 12
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(rust): add comments to release scripts #1490
Merged
Merged
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
653b6e7
chore(rust): add comments to release scripts
RitvikKapila f72f764
bump submodules
RitvikKapila e2ef5af
m
RitvikKapila 89a9321
m
RitvikKapila c8b4fa7
m
RitvikKapila 3301d61
Merge branch 'main' into rkapila/rust-release-doc
RitvikKapila 1cdebcc
m
RitvikKapila File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
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 |
---|---|---|
@@ -1,36 +1,57 @@ | ||
#!/bin/bash -eu | ||
|
||
# Check if exactly one argument is provided | ||
if [ "$#" -ne 1 ]; then | ||
echo 1>&2 "USAGE: start_release.sh N.N.N" | ||
exit 1 | ||
fi | ||
|
||
# Go to the directory of this script | ||
cd $( dirname ${BASH_SOURCE[0]} ) | ||
|
||
# Check if the provided argument matches the version pattern | ||
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 | ||
|
||
# Update the version in Cargo.toml | ||
perl -pe "s/^version = .*$/version = \"$1\"/" < Cargo.toml > new_Cargo.toml | ||
mv new_Cargo.toml Cargo.toml | ||
|
||
# Remove all files and directories in src except for specified files | ||
find src -depth 1 | egrep -v '(intercept.rs|lib.rs|software_externs.rs)' | xargs rm -rf | ||
|
||
# Change to the parent directory and run make polymorph and transpile commands | ||
cd ../.. | ||
make polymorph_rust transpile_rust test_rust | ||
|
||
# Remove target directory | ||
cd runtimes/rust | ||
rm -rf target | ||
|
||
# Remove existing release directory and copy current directory to releases | ||
rm -rf ../../../releases/rust/db_esdk | ||
cp -r . ../../../releases/rust/db_esdk | ||
|
||
# Go to the release directory | ||
cd ../../../releases/rust/db_esdk | ||
|
||
# Restore the dafny_runtime_rust directory that was previously tracked by Git but had been deleted | ||
git checkout dafny_runtime_rust | ||
|
||
# Remove unnecessary files and directories | ||
rm -rf *~ copy_externs.sh start_release.sh test_published.sh test_examples *.pem RELEASE.md | ||
|
||
# Create .gitignore file with specified entries | ||
echo Cargo.lock > .gitignore | ||
echo target >> .gitignore | ||
|
||
# Run cargo test and example tests | ||
cargo test | ||
cargo run --example main | ||
rm -f Cargo.lock *.pem | ||
|
||
# Remove Cargo.lock and .pem files after testing the examples | ||
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 |
---|---|---|
@@ -1,6 +1,5 @@ | ||
[package] | ||
name = "aws-db-esdk-examples" | ||
version = "0.1.0" | ||
edition = "2021" | ||
rust-version = "1.80.0" | ||
|
||
|
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
Submodule smithy-dafny
updated
from 99d3dd to caef77
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removing this version because it creates confusion and isn't needed here anyways.