This was fairly straightforward using the existing build-protoc.sh
script. The only problem I ran into was that the x86 Docker builds
create output directories owned by root, which caused some permission
issues. Fortunately it was easy to get around that just by doing those
Docker builds last.
I made a few small fixes to the documentation related to publishing
protoc artifacts:
- The target directory for Mac should be called osx instead of macos.
- There needs to be a directory for aarch_64.
- We need to avoid calling "mvn clean" inside the protoc-artifacts
directory, since that will delete the contents of the target/
subdirectory.
1. Changed maven script to only do artifact uploading and removed build
script invocation from it. We didn't use maven to invoke the build
script before (we built protoc manually and editted pom.xml to only do
uploading for previous releases), and will not use it in the future (we
will use kokoro to build artifacts).
2. Cleaned up build-protoc.sh and README.md: removed the part about
using maven to build and listed supported platforms explicitly.
1. Changed maven script to only do artifact uploading and removed build
script invocation from it. We didn't use maven to invoke the build
script before (we built protoc manually and editted pom.xml to only do
uploading for previous releases), and will not use it in the future (we
will use kokoro to build artifacts).
2. Cleaned up build-protoc.sh and README.md: removed the part about
using maven to build and listed supported platforms explicitly.
ENTRYPOINT is used even when other commands are specified on the "docker
run" command line. This allows running one-off commands in the docker
image (especially combined with volume binding with the host) with the
correct environment variables.
It is a bad idea to check out code into the docker image, as it will be
out-of-date. It is better to have the image just be the environment, and
let any scripts that need source check them out themselves.
This fixes#4419 in that it allows the image to build again, albeit
users would need to use wget to grab the source of the version of
protobuf they wish.
"make google/protobuf/stubs/pbconfig.h" was added in hope of addressing
the issue that when you "make protoc" from a freshly checked out
project, pbconfig.h will be reported missing. However, the trick doesn't
seem to work. Instead, add instructions in the document to work the issue
around.
Also document why MSYS2 cannot be used for publishing protoc.
1. make google/protobuf/stubs/pbconfig.h before making protoc, otherwise it
won't build a freshly checked-out code.
2. Document the build environments that have been tested to work.
3. Add support for MINGW64
release.
- Do not close the staging repository automatically
- Added staging.repository property
- Updated README with instructions for deployment
- Fix building 32-bit Mac artifact