Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,9 @@ tasks.rat {
// Ignore poetry autogenerated files.
"**/poetry.lock",

// Ignore Cargo lock files.
"sdks/rust/Cargo.lock",

// DuetAI training prompts
"learning/prompts/**/*.md",

Expand Down
25 changes: 25 additions & 0 deletions local-env-setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,13 @@ if [ "$kernelname" = "Linux" ]; then
exit
fi

type -P rustc > /dev/null 2>&1
rustExists=$?
if [ $rustExists -ne 0 ]; then
echo "Installing rust via rustup..."
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
fi

# Running on Mac
elif [ "$kernelname" = "Darwin" ]; then
# Check for Homebrew, install if we don't have it
Expand Down Expand Up @@ -144,5 +151,23 @@ elif [ "$kernelname" = "Darwin" ]; then
exit
fi

type -P rustc > /dev/null 2>&1
rustExists=$?
if [ $rustExists -eq 0 ]; then
echo "rust already installed. Skipping"
else
echo "Installing rust"
brew install rust
fi

type -P protoc > /dev/null 2>&1
protocExists=$?
if [ $protocExists -eq 0 ]; then
echo "protobuf already installed. Skipping"
else
echo "Installing protobuf"
brew install protobuf
fi

else echo "Unrecognized Kernel Name: $kernelname"
fi
4 changes: 4 additions & 0 deletions release/src/main/scripts/set_version.sh
Original file line number Diff line number Diff line change
Expand Up @@ -92,11 +92,13 @@ if [[ -z "$IS_SNAPSHOT_VERSION" ]] ; then
sed -i -e "s/SdkVersion = .*/SdkVersion = \"$TARGET_VERSION\"/" sdks/go/pkg/beam/core/core.go
sed -i -e "s/\"version\": .*/\"version\": \"$TARGET_VERSION\",/" sdks/typescript/package.json
sed -i -e "s/DEFAULT_BEAM_VERSION=\".*\"/DEFAULT_BEAM_VERSION=\"$TARGET_VERSION\"/" scripts/beam-sql.sh
sdks/rust/scripts/set_version.sh "$TARGET_VERSION"
else
# For snapshot version:
# Java/gradle appends -SNAPSHOT
# In the Gradle plugin, the -SNAPSHOT is dynamic so we don't add it here
# Python appends .dev
# Rust appends -SNAPSHOT (Cargo requires semver)
# The Dataflow container remains unchanged as in this case it is beam-master-<date> form
sed -i -e "s/version=.*/version=$TARGET_VERSION-SNAPSHOT/" gradle.properties
sed -i -e "s/project.version = .*/project.version = '$TARGET_VERSION'/" buildSrc/src/main/groovy/org/apache/beam/gradle/BeamModulePlugin.groovy
Expand All @@ -105,6 +107,7 @@ else
sed -i -e "s/SdkVersion = .*/SdkVersion = \"${TARGET_VERSION}.dev\"/" sdks/go/pkg/beam/core/core.go
sed -i -e "s/\"version\": .*/\"version\": \"$TARGET_VERSION-SNAPSHOT\",/" sdks/typescript/package.json
sed -i -e "s/DEFAULT_BEAM_VERSION=\".*\"/DEFAULT_BEAM_VERSION=\"$TARGET_VERSION\"/" scripts/beam-sql.sh
sdks/rust/scripts/set_version.sh "$TARGET_VERSION-SNAPSHOT"
fi

if [[ "$GIT_ADD" == yes ]] ; then
Expand All @@ -115,4 +118,5 @@ if [[ "$GIT_ADD" == yes ]] ; then
git add runners/google-cloud-dataflow-java/build.gradle
git add sdks/typescript/package.json
git add scripts/beam-sql.sh
git add 'sdks/rust/*Cargo.toml' sdks/rust/Cargo.lock
fi
Loading
Loading