From d38f363f0ebb7246b9481900a5f1fa2ef0bab3e8 Mon Sep 17 00:00:00 2001 From: Thanh Ha Date: Thu, 1 Feb 2018 13:50:47 -0500 Subject: [PATCH] Fix local platform file path The local vars path is incorrect in the if-statement but correct in the declaration below it. Update to match. Change-Id: I1e8ec19adf842668fb46e54aaf8beebfcef9c34d Signed-off-by: Thanh Ha --- shell/packer-build.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/shell/packer-build.sh b/shell/packer-build.sh index d3e306f3..34c4014a 100644 --- a/shell/packer-build.sh +++ b/shell/packer-build.sh @@ -22,13 +22,14 @@ PACKER_BUILD_LOG="$PACKER_LOGS_DIR/packer-build.log" mkdir -p "$PACKER_LOGS_DIR" export PATH="${WORKSPACE}/bin:$PATH" +cd packer || exit + # Prioritize the project's own version of vars if available platform_file="common-packer/vars/$PACKER_PLATFORM.json" -if [ -f "$PACKER_PLATFORM" ]; then +if [ -f "vars/$PACKER_PLATFORM.json" ]; then platform_file="vars/$PACKER_PLATFORM.json" fi -cd packer export PACKER_LOG="yes" export PACKER_LOG_PATH="$PACKER_BUILD_LOG" packer.io build -color=false \ -- 2.16.6