Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
google
GitHub Repository: google/crosvm
Path: blob/main/infra/cipd/package_protoc.sh
5394 views
1
#!/usr/bin/env bash
2
# Copyright 2022 The ChromiumOS Authors
3
# Use of this source code is governed by a BSD-style license that can be
4
# found in the LICENSE file.
5
6
BUILD_DIR=$(mktemp -d)
7
cd "$BUILD_DIR" || exit 1
8
9
CIPD_ARGS=(
10
-pkg-var "description:Protoc compiler"
11
-install-mode copy
12
-ref latest
13
)
14
15
PROTOC_URL="https://github.com/protocolbuffers/protobuf/releases/download/v21.1/protoc-21.1"
16
17
cd $(mktemp -d)
18
mkdir pkg
19
wget -q "$PROTOC_URL-win64.zip" -O "protoc.zip"
20
unzip -p "protoc.zip" "bin/protoc.exe" > "pkg/protoc.exe"
21
cipd create -in "pkg" -name "crosvm/protoc/windows-amd64" "${CIPD_ARGS[@]}"
22
23
cd $(mktemp -d)
24
mkdir pkg
25
wget -q "$PROTOC_URL-linux-x86_64.zip" -O "protoc.zip"
26
unzip -p "protoc.zip" "bin/protoc" > "pkg/protoc"
27
cipd create -in "pkg" -name "crosvm/protoc/linux-amd64" "${CIPD_ARGS[@]}"
28
29