From d717617792a29499f39863db0a2020c1071e1208 Mon Sep 17 00:00:00 2001 From: Patrik Kernstock Date: Sun, 17 Mar 2019 03:18:33 +0100 Subject: [PATCH] Ignore ".gitignore" file in archive --- .gitattributes | 1 + build.sh | 12 +++++++----- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/.gitattributes b/.gitattributes index 0f69b75..e43d4e2 100644 --- a/.gitattributes +++ b/.gitattributes @@ -4,4 +4,5 @@ # Keep this files out of generated ZIPs by "git archive" /screenshots export-ignore .gitattributes export-ignore +.gitignore export-ignore build.sh export-ignore diff --git a/build.sh b/build.sh index 0e23c88..0f4a482 100644 --- a/build.sh +++ b/build.sh @@ -18,19 +18,21 @@ INFO_VERSION=$(echo $INFO_JSON | jq --raw-output '.version') FOLDER_NAME=${INFO_NAME}_${INFO_VERSION} # Let's create a git tag for this release -echo "Tagging release 'v${INFO_VERSION}'..." -git tag --annotate --force "v${INFO_VERSION}" +echo "* Tagging release 'v${INFO_VERSION}'..." +git tag --force --annotate "v${INFO_VERSION}" --message "${INFO_TITLE} v${INFO_VERSION} released." # making a zip -echo "Creating ZIP archive..." +echo "* Creating ZIP archive..." git archive --format=zip --prefix "${FOLDER_NAME}/" -o "${FOLDER_NAME}.zip" "v${INFO_VERSION}" # check if release mode. if [ "$MODE" == "release" ]; then + echo "* Updating git..." echo "Pushing git..." git push --all + echo "Pushing tags..." git push --tags --force - echo "Release 'v${INFO_VERSION}' done." + echo "Release 'v${INFO_VERSION}' done!" else - echo "Release archive for 'v${INFO_VERSION}' created.." + echo "Release archive for 'v${INFO_VERSION}' created!" fi