From 7b5263d300b1560e3a8d5ea204ee2761e9ee6904 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marko=20Budiseli=C4=87?= Date: Tue, 30 Mar 2021 12:48:45 +0200 Subject: [PATCH] Fix release package script (#131) --- release/package/run.sh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/release/package/run.sh b/release/package/run.sh index fe8443cac..338850ccd 100755 --- a/release/package/run.sh +++ b/release/package/run.sh @@ -47,8 +47,14 @@ make_package () { echo "Building Memgraph $offering for $os on $build_container..." echo "Copying project files..." + # If master is not the current branch, fetch it, because the get_version + # script depends on it. If we are on master, the fetch command is going to + # fail so that's why there is the explicit check. # Required here because Docker build container can't access remote. - cd "$PROJECT_ROOT" && git fetch origin master:master + cd "$PROJECT_ROOT" + if [[ "$(git rev-parse --abbrev-ref HEAD)" != "master" ]]; then + git fetch origin master:master + fi docker exec "$build_container" mkdir -p /memgraph docker cp "$PROJECT_ROOT/." "$build_container:/memgraph/"