Simplify dependency upgrade process and upgrade Pulsar C++ client to 3.1.0 #56
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.
Motivation
Currently there are many files that require the download URLs of dependencies to download them. It's hard to maintain if some download URL changed. For example, #17 updates the ZLib download URL under https://zlib.net/fossils/ for macOS build. However, the ZLib download URL for Linux is under https://github.com/madler/zlib/archive/. The same goes for the Pulsar C++ client, it's hard to test another URL because the candidates and the official releases are stored in different paths.
Modifications
Add a
dep-url.sh
to provide two shell functions:pulsar_cpp_base_url
: Print the base URL of the Pulsar C++ client release, there are the source code or binaries in the subpath.download_dependency
: Download the source code according to the dependency file and the dependency name.Then apply the
dep-url.sh
in all files that need to download the source or binary of the dependencies.In addition, this PR upgrades the
pulsar-cpp
dependency to 3.1.0 so that the Windows build can depend on an official release.