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}