Skip to content
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

AVRO-3423: Add build.sh step to encapsulate all the steps needed during release #1570

Closed
wants to merge 36 commits into from
Closed
Changes from 2 commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
10dfc37
Add build.sh release
Feb 26, 2022
041cea3
Add quptes
Feb 26, 2022
9728e4e
Call dist drom release if needed
Feb 26, 2022
37969df
Use RELELEASE=1 approach
Feb 26, 2022
d44f97c
Combine dist and release
Feb 26, 2022
01b00b1
Add verify-release
Feb 27, 2022
9cb6f7b
Add ask shell function
Feb 28, 2022
094e4bf
Add disable ask
Feb 28, 2022
24b9597
Add ask to release
Mar 1, 2022
ea34d82
Add ask to release
Mar 1, 2022
58087e9
Add dry run option to build.sh
Mar 8, 2022
1b4bb56
Tweak interop-data-test
Mar 8, 2022
4529ceb
Tweak test
Mar 8, 2022
ca37318
Add build-helper.sh
Mar 8, 2022
cc31d5f
Add execute helper function
Mar 8, 2022
5fb53d3
Add other languages
Mar 8, 2022
c289053
Move lines to end
Mar 8, 2022
cfe026e
Merge branch 'master' into avro-3424-add-build-sh-release-csharp
Mar 8, 2022
df4be9d
AVRO-3424: Add 'release' step for the Rust SDK
martin-g Mar 8, 2022
c9ca4bc
Fix C build.sh
Mar 8, 2022
30ed375
Merge branch 'avro-3424-add-build-sh-release-csharp' of github.com:zc…
Mar 8, 2022
3f09206
Change dir into build.sh folder
Mar 8, 2022
5f7621e
Fix whitespaces
Mar 8, 2022
b7c4e58
Lang specific options are set via env vars for now
Mar 8, 2022
c0cd424
Remove BUILD_DESCRIPTION
Mar 9, 2022
c9ced07
Support extra commands
Mar 9, 2022
c9f26d5
Measure build time
Mar 9, 2022
0e61c64
Nothing to do
Mar 9, 2022
5fc2a2b
Fix shellcheck warnings
Mar 9, 2022
3f127f6
Use globbing instead of find to match files
Mar 9, 2022
7432a4c
aa
martin-g May 12, 2022
4757ead
Merge branch 'master' into avro-3424-add-build-sh-release-csharp
martin-g May 12, 2022
69772c3
AVRO-3423: Update the `dist` and `release` steps for Rust module
martin-g May 13, 2022
6ebfc85
AVRO-3423: Fix Bash Shell syntax. Return true in the function
martin-g May 13, 2022
bdc773c
Merge master
Sep 18, 2023
388daa3
Add command_doc
Sep 18, 2023
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
29 changes: 29 additions & 0 deletions lang/csharp/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,35 @@ do
cp -pr build/doc/* ${ROOT}/build/avro-doc-${VERSION}/api/csharp
;;

release)
# "dist" step must be executed before this step
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What do you think about the following:

extract all the logic in dist) to a function, so it will look like:

...
dist)
   dist()
release)
  release()
...

This way the first few lines of release() could check if there are artifacts created by dist() and call dist() if there are no such. Something like:

function release() {
  if [ ! -f .../some/file ]; then
    dist()
  fi

  # release stuff
}


# If not specified use default location
[ "$NUGET_SOURCE" ] || NUGET_SOURCE="https://api.nuget.org/v3/index.json"

# Set NUGET_KEY beofre executing script. E.g. `NUGET_KEY="YOUR_KEY" ./build.sh release`
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

typo in before

[ "$NUGET_KEY" ] || (echo "NUGET_KEY is not set"; exit 1)

PACKAGES_TO_PUSH=("./build/main/Apache.Avro.${VERSION}.nupkg")
PACKAGES_TO_PUSH+=("./build/codegen/Apache.Avro.Tools.${VERSION}.nupkg")
PACKAGES_TO_PUSH+=("./build/codec/Avro.File.Snappy/Apache.Avro.File.Snappy.${VERSION}.nupkg")
PACKAGES_TO_PUSH+=("./build/codec/Avro.File.BZip2/Apache.Avro.File.BZip2.${VERSION}.nupkg")
PACKAGES_TO_PUSH+=("./build/codec/Avro.File.XZ/Apache.Avro.File.XZ.${VERSION}.nupkg")
PACKAGES_TO_PUSH+=("./build/codec/Avro.File.Zstandard/Apache.Avro.File.Zstandard.${VERSION}.nupkg")

# Check if all packages exist
for package in "${PACKAGES_TO_PUSH[@]}"
do
[ -f "$package" ] || (echo "Package $package does not exist. Run './build.sh dist' first."; exit 1)
done

# Push packages to nuget.org
for package in "${PACKAGES_TO_PUSH[@]}"
do
dotnet nuget push "$package" -k "$NUGET_KEY" -s "$NUGET_SOURCE"
done
;;

interop-data-generate)
dotnet run --project src/apache/test/Avro.test.csproj --framework net6.0 ../../share/test/schemas/interop.avsc ../../build/interop/data
;;
Expand Down