-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
zcsizmadia
wants to merge
36
commits into
apache:main
from
zcsizmadia:avro-3424-add-build-sh-release-csharp
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
041cea3
Add quptes
9728e4e
Call dist drom release if needed
37969df
Use RELELEASE=1 approach
d44f97c
Combine dist and release
01b00b1
Add verify-release
9cb6f7b
Add ask shell function
094e4bf
Add disable ask
24b9597
Add ask to release
ea34d82
Add ask to release
58087e9
Add dry run option to build.sh
1b4bb56
Tweak interop-data-test
4529ceb
Tweak test
ca37318
Add build-helper.sh
cc31d5f
Add execute helper function
5fb53d3
Add other languages
c289053
Move lines to end
cfe026e
Merge branch 'master' into avro-3424-add-build-sh-release-csharp
df4be9d
AVRO-3424: Add 'release' step for the Rust SDK
martin-g c9ca4bc
Fix C build.sh
30ed375
Merge branch 'avro-3424-add-build-sh-release-csharp' of github.com:zc…
3f09206
Change dir into build.sh folder
5f7621e
Fix whitespaces
b7c4e58
Lang specific options are set via env vars for now
c0cd424
Remove BUILD_DESCRIPTION
c9ced07
Support extra commands
c9f26d5
Measure build time
0e61c64
Nothing to do
5fc2a2b
Fix shellcheck warnings
3f127f6
Use globbing instead of find to match files
7432a4c
aa
martin-g 4757ead
Merge branch 'master' into avro-3424-add-build-sh-release-csharp
martin-g 69772c3
AVRO-3423: Update the `dist` and `release` steps for Rust module
martin-g 6ebfc85
AVRO-3423: Fix Bash Shell syntax. Return true in the function
martin-g bdc773c
Merge master
388daa3
Add command_doc
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 | ||
|
||
# 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` | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. typo in |
||
[ "$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 | ||
;; | ||
|
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.
What do you think about the following:
extract all the logic in
dist)
to a function, so it will look like:This way the first few lines of
release()
could check if there are artifacts created bydist()
and calldist()
if there are no such. Something like: