From 72ec6fcc03752f759fa1114c6c6e6a94a6d24055 Mon Sep 17 00:00:00 2001 From: Mike Aizatsky Date: Fri, 10 Mar 2017 11:14:11 -0800 Subject: [PATCH] [infra] accepting OSSFUZZ_REVISION env variable --- infra/base-images/base-builder/srcmap | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/infra/base-images/base-builder/srcmap b/infra/base-images/base-builder/srcmap index 62c5de4db..6ead9ada4 100755 --- a/infra/base-images/base-builder/srcmap +++ b/infra/base-images/base-builder/srcmap @@ -1,4 +1,4 @@ -#!/bin/bash -eux +#!/bin/bash -eu # Copyright 2016 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -52,5 +52,9 @@ for DOT_HG_DIR in $(find $SRC -name ".hg" -type d); do jq_inplace $SRCMAP ".\"$HG_DIR\" = { type: \"hg\", url: \"$HG_URL\", rev: \"$HG_REV\" }" done +if [ "${OSSFUZZ_REVISION-0}" -ne "0" ]; then + jq_inplace $SRCMAP ".\"/src\" = { type: \"git\", url: \"https://github.com/google/oss-fuzz.git\", rev: \"$OSSFUZZ_REVISION\" }" +fi + cat $SRCMAP rm $SRCMAP