Release scripts fixes

This commit is contained in:
Petr Pokorny
2021-03-12 18:02:57 +01:00
parent f825aefb3d
commit eb2850029a
2 changed files with 6 additions and 3 deletions

View File

@@ -45,7 +45,7 @@ buildPackageStyle() {
fi
}
export GITHUB_USER=mapbox
export GITHUB_USER=maplibre
export GITHUB_REPO=maplibre-gl-native
export BUILDTYPE=Release
export PACKAGE_FORMAT=xcframework

View File

@@ -80,6 +80,7 @@ export GITHUB_USER=maplibre
export GITHUB_REPO=maplibre-gl-native
export BUILDTYPE=Release
VERSION_TAG=${VERSION_TAG:-''}
PUBLISH_VERSION=
BINARY_DIRECTORY=${BINARY_DIRECTORY:-build/macos/deploy}
@@ -111,10 +112,12 @@ if [[ $( echo ${VERSION_TAG} | grep --invert-match macos-v ) ]]; then
exit 1
fi
if [[ $( wget --spider -O- https://api.github.com/repos/${GITHUB_USER}/${GITHUB_REPO}/releases/tags/${VERSION_TAG} 2>&1 | grep -c "404 Not Found" ) == 0 ]]; then
if [[ github-release info --tag ${VERSION_TAG} | grep --quiet "draft: ✗" ]]; then
echo "Error: ${VERSION_TAG} has already been published on GitHub"
echo "See: https://github.com/${GITHUB_USER}/${GITHUB_REPO}/releases/tag/${VERSION_TAG}"
exit 1
if [[ "${GITHUB_RELEASE}" == true ]]; then
exit 1
fi
fi
PUBLISH_VERSION=$( echo ${VERSION_TAG} | sed 's/^macos-v//' )