From f7f267213cc631536023a49c0f3345be795a0e44 Mon Sep 17 00:00:00 2001 From: Penny Zheng Date: Wed, 2 May 2018 03:10:39 +0000 Subject: [PATCH] rootfs: Add "${AGENT_VERSION}"/"-a" functionality For now, the flag "-a" or relevant shell variant "${AGENT_VERSION}" hasn't been used, only defined. Using 'git checkout' command to go into requested branch. Fixes: #90 Signed-off-by: Penny Zheng --- rootfs-builder/rootfs.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/rootfs-builder/rootfs.sh b/rootfs-builder/rootfs.sh index 573499ee5f..c9f219dc43 100755 --- a/rootfs-builder/rootfs.sh +++ b/rootfs-builder/rootfs.sh @@ -246,6 +246,7 @@ OK "Pull Agent source code" info "Build agent" pushd "${GOPATH_LOCAL}/src/${GO_AGENT_PKG}" +[ -n "${AGENT_VERSION}" ] && git checkout "${AGENT_VERSION}" && OK "git checkout successful" || true make clean make INIT=${AGENT_INIT} make install DESTDIR="${ROOTFS_DIR}" INIT=${AGENT_INIT}