Merge pull request #2697 from abler98/feature/workspace/protoc
Add support for Protoc in workspace
This commit is contained in:
commit
f5d630c025
@ -152,6 +152,8 @@ services:
|
|||||||
- INSTALL_WKHTMLTOPDF=${WORKSPACE_INSTALL_WKHTMLTOPDF}
|
- INSTALL_WKHTMLTOPDF=${WORKSPACE_INSTALL_WKHTMLTOPDF}
|
||||||
- INSTALL_GNU_PARALLEL=${WORKSPACE_INSTALL_GNU_PARALLEL}
|
- INSTALL_GNU_PARALLEL=${WORKSPACE_INSTALL_GNU_PARALLEL}
|
||||||
- INSTALL_LNAV=${WORKSPACE_INSTALL_LNAV}
|
- INSTALL_LNAV=${WORKSPACE_INSTALL_LNAV}
|
||||||
|
- INSTALL_PROTOC=${WORKSPACE_INSTALL_PROTOC}
|
||||||
|
- PROTOC_VERSION=${WORKSPACE_PROTOC_VERSION}
|
||||||
- http_proxy
|
- http_proxy
|
||||||
- https_proxy
|
- https_proxy
|
||||||
- no_proxy
|
- no_proxy
|
||||||
|
@ -179,6 +179,8 @@ WORKSPACE_VUE_CLI_UI_HOST_PORT=8001
|
|||||||
WORKSPACE_ANGULAR_CLI_SERVE_HOST_PORT=4200
|
WORKSPACE_ANGULAR_CLI_SERVE_HOST_PORT=4200
|
||||||
WORKSPACE_INSTALL_GIT_PROMPT=false
|
WORKSPACE_INSTALL_GIT_PROMPT=false
|
||||||
WORKSPACE_INSTALL_LNAV=false
|
WORKSPACE_INSTALL_LNAV=false
|
||||||
|
WORKSPACE_INSTALL_PROTOC=false
|
||||||
|
WORKSPACE_PROTOC_VERSION=latest
|
||||||
|
|
||||||
### PHP_FPM ###############################################
|
### PHP_FPM ###############################################
|
||||||
|
|
||||||
|
@ -1386,6 +1386,27 @@ RUN if [ ${INSTALL_LNAV} = true ]; then \
|
|||||||
apt-get install -y lnav \
|
apt-get install -y lnav \
|
||||||
;fi
|
;fi
|
||||||
|
|
||||||
|
###########################################################################
|
||||||
|
# Protoc:
|
||||||
|
###########################################################################
|
||||||
|
|
||||||
|
ARG INSTALL_PROTOC=false
|
||||||
|
ARG PROTOC_VERSION
|
||||||
|
|
||||||
|
RUN if [ ${INSTALL_PROTOC} = true ]; then \
|
||||||
|
if [ ${PROTOC_VERSION} = "latest" ]; then \
|
||||||
|
REAL_PROTOC_VERSION=$(curl -s https://api.github.com/repos/protocolbuffers/protobuf/releases/latest | \
|
||||||
|
sed -nr 's/.*"tag_name":\s?"v(.+?)".*/\1/p'); \
|
||||||
|
else \
|
||||||
|
REAL_PROTOC_VERSION=${PROTOC_VERSION}; \
|
||||||
|
fi && \
|
||||||
|
PROTOC_ZIP=protoc-${REAL_PROTOC_VERSION}-linux-x86_64.zip; \
|
||||||
|
curl -L -o /tmp/protoc.zip https://github.com/protocolbuffers/protobuf/releases/download/v${REAL_PROTOC_VERSION}/${PROTOC_ZIP} && \
|
||||||
|
unzip -q -o /tmp/protoc.zip -d /usr/local bin/protoc && \
|
||||||
|
unzip -q -o /tmp/protoc.zip -d /usr/local 'include/*' && \
|
||||||
|
rm -f /tmp/protoc.zip \
|
||||||
|
;fi
|
||||||
|
|
||||||
###########################################################################
|
###########################################################################
|
||||||
# Check PHP version:
|
# Check PHP version:
|
||||||
###########################################################################
|
###########################################################################
|
||||||
|
Loading…
Reference in New Issue
Block a user