Skip to content

Commit

Permalink
Ignore ".gitignore" file in archive
Browse files Browse the repository at this point in the history
  • Loading branch information
patschi committed Mar 17, 2019
1 parent 581d007 commit d717617
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -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
12 changes: 7 additions & 5 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit d717617

Please sign in to comment.