Skip to content

Commit 4eac02b

Browse files
committed
clean up sync script
Signed-off-by: Appu Goundan <appu@google.com>
1 parent bb9f477 commit 4eac02b

File tree

1 file changed

+12
-9
lines changed

1 file changed

+12
-9
lines changed

service-protos/sync-rekor-tiles.sh

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -13,18 +13,21 @@ if [ -z "$latest_tag" ]; then
1313
fi
1414

1515
# clean up last sync
16-
rm ./rekor/v2/*.proto
16+
rm ./rekor/v2/*.proto || echo "nothing to clean up"
17+
18+
# mkdir just in case
19+
mkdir -p ./rekor/v2
1720

1821
# copy all protos over except rekor_service.proto
1922
echo "syncing protos with ${latest_tag}"
20-
git clone --filter=blob:none --no-checkout --depth=1 https://github.com/sigstore/rekor-tiles.git ./rekor-tiles && \
21-
cd ./rekor-tiles && \
22-
git sparse-checkout set --no-cone '/api/proto/rekor/v2/*.proto' '!**/rekor_service.proto' && \
23-
git fetch origin tag "$latest_tag" --no-tags && \
24-
git checkout "$latest_tag" && \
25-
cd ../ && \
26-
cp -R ./rekor-tiles/api/proto/* . && \
27-
rm -rf ./rekor-tiles
23+
git clone --filter=blob:none --no-checkout --depth=1 https://github.com/sigstore/rekor-tiles.git ./rekor-tiles
24+
cd ./rekor-tiles
25+
git sparse-checkout set --no-cone '/api/proto/rekor/v2/*.proto' '!**/rekor_service.proto'
26+
git fetch origin tag "$latest_tag" --no-tags
27+
git checkout "$latest_tag"
28+
cd ../
29+
cp -R ./rekor-tiles/api/proto/* .
30+
rm -rf ./rekor-tiles
2831

2932
# replace the go package from the service definition to the protobuf out
3033
echo "replacing go-package"

0 commit comments

Comments
 (0)