From d554115ea1bd323461b459c58a822aa0512609be Mon Sep 17 00:00:00 2001 From: Petr Pokorny Date: Sun, 31 Jan 2021 14:30:55 +0100 Subject: [PATCH 01/11] Added debug code --- platform/ios/platform/macos/scripts/deploy-packages.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/platform/ios/platform/macos/scripts/deploy-packages.sh b/platform/ios/platform/macos/scripts/deploy-packages.sh index 180543fdc..2355bd288 100755 --- a/platform/ios/platform/macos/scripts/deploy-packages.sh +++ b/platform/ios/platform/macos/scripts/deploy-packages.sh @@ -140,11 +140,14 @@ if [[ "${GITHUB_RELEASE}" == true ]]; then --draft ${PUBLISH_PRE_FLAG} fi +step "publish -r xpackage -s symbols" publish -r xpackage -s symbols if [[ ${ENABLE_APP_PUBLISH} = "YES" ]]; then + step "publish -r "xpackage SYMBOLS=NO" -a true" publish -r "xpackage SYMBOLS=NO" -a true else + step "publish -r "xpackage SYMBOLS=NO" publish -r "xpackage SYMBOLS=NO" fi; From 117a4c589911ae68e850bb09b71289f1de9524a2 Mon Sep 17 00:00:00 2001 From: Petr Pokorny Date: Mon, 1 Feb 2021 00:32:09 +0100 Subject: [PATCH 02/11] cmake configuration to nesure mbgl-core contains arm64 libraries --- .github/workflows/macos-release.yml | 7 +++---- CMakeLists.txt | 2 +- platform/ios/CMakeLists.txt | 2 +- platform/ios/ios.cmake | 6 ++++++ .../ios/platform/macos/macos.xcodeproj/project.pbxproj | 1 - platform/ios/platform/macos/scripts/deploy-packages.sh | 3 --- platform/macos/macos.cmake | 6 ++++++ 7 files changed, 17 insertions(+), 10 deletions(-) diff --git a/.github/workflows/macos-release.yml b/.github/workflows/macos-release.yml index 86b8edb62..32e66a715 100644 --- a/.github/workflows/macos-release.yml +++ b/.github/workflows/macos-release.yml @@ -16,6 +16,7 @@ jobs: SYMBOLS: NO HOMEBREW_NO_AUTO_UPDATE: 1 HOMEBREW_NO_INSTALL_CLEANUP: 1 + CILAUNCH: true defaults: run: working-directory: platform/ios @@ -73,13 +74,11 @@ jobs: - name: Install packaging dependencies run: | ./platform/ios/scripts/install-packaging-dependencies.sh - env: - CILAUNCH: true - name: Build package run: make xpackage - + - name: Deploy package run: make xdeploy env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file diff --git a/CMakeLists.txt b/CMakeLists.txt index c8eea2361..f1fd7c089 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.10 FATAL_ERROR) +cmake_minimum_required(VERSION 3.19 FATAL_ERROR) project("Mapbox GL Native" LANGUAGES CXX C) set_property(GLOBAL PROPERTY USE_FOLDERS ON) diff --git a/platform/ios/CMakeLists.txt b/platform/ios/CMakeLists.txt index a5ad73c54..75ab9f173 100644 --- a/platform/ios/CMakeLists.txt +++ b/platform/ios/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.9) +cmake_minimum_required(VERSION 3.19) message(source-dir=${CMAKE_SOURCE_DIR} current-dir=${CMAKE_CURRENT_SOURCE_DIR} current-binary-dir=${CMAKE_CURRENT_BINARY_DIR}) diff --git a/platform/ios/ios.cmake b/platform/ios/ios.cmake index d00b80267..f16b2ed90 100644 --- a/platform/ios/ios.cmake +++ b/platform/ios/ios.cmake @@ -4,6 +4,12 @@ if(NOT DEFINED IOS_DEPLOYMENT_TARGET) set(IOS_DEPLOYMENT_TARGET "9.0") endif() +# Override default CMake NATIVE_ARCH_ACTUAL +# https://gitlab.kitware.com/cmake/cmake/-/issues/20893 +# https://stackoverflow.com/a/22689917/5531400 +set(CMAKE_OSX_ARCHITECTURES "$(ARCHS_STANDARD)") +set_target_properties(mbgl-core PROPERTIES XCODE_ATTRIBUTE_ONLY_ACTIVE_ARCH[variant=Debug] "YES") + macro(initialize_ios_target target) set_target_properties(${target} PROPERTIES XCODE_ATTRIBUTE_IPHONEOS_DEPLOYMENT_TARGET "${IOS_DEPLOYMENT_TARGET}") set_target_properties(${target} PROPERTIES XCODE_ATTRIBUTE_ENABLE_BITCODE "YES") diff --git a/platform/ios/platform/macos/macos.xcodeproj/project.pbxproj b/platform/ios/platform/macos/macos.xcodeproj/project.pbxproj index 05e15e11e..f1e82ba0c 100644 --- a/platform/ios/platform/macos/macos.xcodeproj/project.pbxproj +++ b/platform/ios/platform/macos/macos.xcodeproj/project.pbxproj @@ -2191,7 +2191,6 @@ DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 15256; DYLIB_INSTALL_NAME_BASE = "@rpath"; - "EXCLUDED_ARCHS[sdk=*]" = arm64; FRAMEWORK_VERSION = A; INFOPLIST_FILE = sdk/Info.plist; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; diff --git a/platform/ios/platform/macos/scripts/deploy-packages.sh b/platform/ios/platform/macos/scripts/deploy-packages.sh index 2355bd288..180543fdc 100755 --- a/platform/ios/platform/macos/scripts/deploy-packages.sh +++ b/platform/ios/platform/macos/scripts/deploy-packages.sh @@ -140,14 +140,11 @@ if [[ "${GITHUB_RELEASE}" == true ]]; then --draft ${PUBLISH_PRE_FLAG} fi -step "publish -r xpackage -s symbols" publish -r xpackage -s symbols if [[ ${ENABLE_APP_PUBLISH} = "YES" ]]; then - step "publish -r "xpackage SYMBOLS=NO" -a true" publish -r "xpackage SYMBOLS=NO" -a true else - step "publish -r "xpackage SYMBOLS=NO" publish -r "xpackage SYMBOLS=NO" fi; diff --git a/platform/macos/macos.cmake b/platform/macos/macos.cmake index bb140d02c..03192d803 100644 --- a/platform/macos/macos.cmake +++ b/platform/macos/macos.cmake @@ -1,5 +1,11 @@ set(CMAKE_OSX_DEPLOYMENT_TARGET "10.11") +# Override default CMake NATIVE_ARCH_ACTUAL +# https://gitlab.kitware.com/cmake/cmake/-/issues/20893 +# https://stackoverflow.com/a/22689917/5531400 +set(CMAKE_OSX_ARCHITECTURES "$(ARCHS_STANDARD)") +set_target_properties(mbgl-core PROPERTIES XCODE_ATTRIBUTE_ONLY_ACTIVE_ARCH[variant=Debug] "YES") + set_target_properties(mbgl-core PROPERTIES XCODE_ATTRIBUTE_CLANG_ENABLE_OBJC_ARC YES) if(MBGL_WITH_OPENGL) From 4fa41d4c9b50eee102d75d748ffe71e2fd9a3b18 Mon Sep 17 00:00:00 2001 From: Petr Pokorny Date: Mon, 1 Feb 2021 08:03:12 +0100 Subject: [PATCH 03/11] Keep minimum cmake requirement 3.10 for non-ios builds --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index f1fd7c089..c8eea2361 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.19 FATAL_ERROR) +cmake_minimum_required(VERSION 3.10 FATAL_ERROR) project("Mapbox GL Native" LANGUAGES CXX C) set_property(GLOBAL PROPERTY USE_FOLDERS ON) From feea6ecf07346ea792d3357a01f5c01bb9416df4 Mon Sep 17 00:00:00 2001 From: Petr Pokorny Date: Mon, 1 Feb 2021 08:12:19 +0100 Subject: [PATCH 04/11] Testing publish script --- platform/ios/platform/macos/scripts/deploy-packages.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/platform/ios/platform/macos/scripts/deploy-packages.sh b/platform/ios/platform/macos/scripts/deploy-packages.sh index 180543fdc..20ead7113 100755 --- a/platform/ios/platform/macos/scripts/deploy-packages.sh +++ b/platform/ios/platform/macos/scripts/deploy-packages.sh @@ -134,10 +134,10 @@ if [[ "${GITHUB_RELEASE}" == true ]]; then if [[ $( echo ${PUBLISH_VERSION} | awk '/[0-9]-/' ) ]]; then PUBLISH_PRE_FLAG='--pre-release' fi - github-release release \ - --tag "macos-v${PUBLISH_VERSION}" \ - --name "macos-v${PUBLISH_VERSION}" \ - --draft ${PUBLISH_PRE_FLAG} + # github-release release \ + # --tag "macos-v${PUBLISH_VERSION}" \ + # --name "macos-v${PUBLISH_VERSION}" \ + # --draft ${PUBLISH_PRE_FLAG} fi publish -r xpackage -s symbols From 950c6ecd976ee76f69c60a17a1a9e56a6cc67c35 Mon Sep 17 00:00:00 2001 From: Petr Pokorny Date: Mon, 1 Feb 2021 08:17:28 +0100 Subject: [PATCH 05/11] Testing publish script --- platform/ios/platform/macos/scripts/deploy-packages.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platform/ios/platform/macos/scripts/deploy-packages.sh b/platform/ios/platform/macos/scripts/deploy-packages.sh index 20ead7113..042ed4b80 100755 --- a/platform/ios/platform/macos/scripts/deploy-packages.sh +++ b/platform/ios/platform/macos/scripts/deploy-packages.sh @@ -118,7 +118,7 @@ if [[ $( wget --spider -O- https://api.github.com/repos/${GITHUB_USER}/${GITHUB_ fi PUBLISH_VERSION=$( echo ${VERSION_TAG} | sed 's/^macos-v//' ) -git checkout ${VERSION_TAG} +#git checkout ${VERSION_TAG} step "Deploying version ${PUBLISH_VERSION}…" From b6d316ffa9a05de96e682fff72fcb368b5b29ebd Mon Sep 17 00:00:00 2001 From: Petr Pokorny Date: Mon, 1 Feb 2021 09:48:11 +0100 Subject: [PATCH 06/11] Added support for macos release notes --- .../platform/macos/scripts/deploy-packages.sh | 21 +++- .../macos/scripts/release-notes-github.md.ejs | 2 + .../macos/scripts/release-notes-jazzy.md.ejs | 15 +++ .../platform/macos/scripts/release-notes.js | 103 ++++++++++++++++++ 4 files changed, 135 insertions(+), 6 deletions(-) create mode 100644 platform/ios/platform/macos/scripts/release-notes-github.md.ejs create mode 100644 platform/ios/platform/macos/scripts/release-notes-jazzy.md.ejs create mode 100755 platform/ios/platform/macos/scripts/release-notes.js diff --git a/platform/ios/platform/macos/scripts/deploy-packages.sh b/platform/ios/platform/macos/scripts/deploy-packages.sh index 042ed4b80..6a18ebc4b 100755 --- a/platform/ios/platform/macos/scripts/deploy-packages.sh +++ b/platform/ios/platform/macos/scripts/deploy-packages.sh @@ -47,7 +47,7 @@ publish() { else file_name=mapbox-macos-sdk-${PUBLISH_VERSION}-${suffix}.zip fi - step "Compressing ${file_name}…" + step "Compressing ${file_name}-> ${pwd}../deploy/${file_name}" cd build/macos/pkg rm -f ../deploy/${file_name} zip -yr ../deploy/${file_name} * @@ -118,7 +118,7 @@ if [[ $( wget --spider -O- https://api.github.com/repos/${GITHUB_USER}/${GITHUB_ fi PUBLISH_VERSION=$( echo ${VERSION_TAG} | sed 's/^macos-v//' ) -#git checkout ${VERSION_TAG} +git checkout ${VERSION_TAG} step "Deploying version ${PUBLISH_VERSION}…" @@ -129,15 +129,24 @@ fi npm install --ignore-scripts mkdir -p ${BINARY_DIRECTORY} +step "Generating release notes…" +RELEASE_NOTES=$( ./platform/macos/scripts/release-notes.js github ) + +if [[ -z "${RELEASE_NOTES}" ]]; then + echo "Release notes cannot be empty." + exit 1 +fi + if [[ "${GITHUB_RELEASE}" == true ]]; then step "Create GitHub release…" if [[ $( echo ${PUBLISH_VERSION} | awk '/[0-9]-/' ) ]]; then PUBLISH_PRE_FLAG='--pre-release' fi - # github-release release \ - # --tag "macos-v${PUBLISH_VERSION}" \ - # --name "macos-v${PUBLISH_VERSION}" \ - # --draft ${PUBLISH_PRE_FLAG} + github-release release \ + --tag "macos-v${PUBLISH_VERSION}" \ + --name "macos-v${PUBLISH_VERSION}" \ + --description "${RELEASE_NOTES}" \ + --draft ${PUBLISH_PRE_FLAG} fi publish -r xpackage -s symbols diff --git a/platform/ios/platform/macos/scripts/release-notes-github.md.ejs b/platform/ios/platform/macos/scripts/release-notes-github.md.ejs new file mode 100644 index 000000000..d0affd8d5 --- /dev/null +++ b/platform/ios/platform/macos/scripts/release-notes-github.md.ejs @@ -0,0 +1,2 @@ +<%-CHANGELOG-%> + diff --git a/platform/ios/platform/macos/scripts/release-notes-jazzy.md.ejs b/platform/ios/platform/macos/scripts/release-notes-jazzy.md.ejs new file mode 100644 index 000000000..fe81ab0c6 --- /dev/null +++ b/platform/ios/platform/macos/scripts/release-notes-jazzy.md.ejs @@ -0,0 +1,15 @@ +# [MapLibre Maps SDK for macos] + +The MapLibre Maps SDK for macos is an open-source framework for embedding interactive map views with scalable, customizable vector maps into Cocoa Touch applications on iOS 9.0 and above using Objective-C, Swift, or Interface Builder. It takes stylesheets that conform to the [Mapbox Style Specification](https://www.mapbox.com/mapbox-gl-style-spec/), applies them to vector tiles that conform to the [Mapbox Vector Tile Specification](https://www.mapbox.com/developers/vector-tiles/), and renders them using OpenGL. + +## Changes in version <%-CURRENTVERSION%> + +<%-CURRENTCHANGELOG%> + +## Recent changes + +<% OTHERRELEASES.forEach(function(release) { %> +### <%-release.version%> + +<%-release.changelog%> +<% }) -%> diff --git a/platform/ios/platform/macos/scripts/release-notes.js b/platform/ios/platform/macos/scripts/release-notes.js new file mode 100755 index 000000000..6e46863c0 --- /dev/null +++ b/platform/ios/platform/macos/scripts/release-notes.js @@ -0,0 +1,103 @@ +#!/usr/bin/env node + +const fs = require('fs'); +const execSync = require('child_process').execSync; +const ejs = require('ejs'); +const _ = require('lodash'); +const semver = require('semver'); + +const changelogPath = 'platform/macos/CHANGELOG.md'; +const changelog = fs.readFileSync(changelogPath, 'utf8'); + +let outputMode = {}; +switch(process.argv[2]) { + case "jazzy": + outputMode.isJazzy = true; break; + case "github": + default: + outputMode.isGitHub = true; +} + +/* + Find current and immediately previous releases by parsing git tags. +*/ +let currentVersion = execSync('git describe --tags --match=macos-v*.*.* --abbrev=0') + .toString() + .trim() + .replace('macos-v', ''); + +let gitTags = execSync('git tag --list macos-v*.*.*') + .toString() + .split('\n') + .map(function (tag) { + tag = tag.replace('macos-v', '').trim(); + return semver.clean(tag); + }); +let previousVersion = semver.maxSatisfying(gitTags, "<" + currentVersion); + +/* + Parse the raw changelog text and split it into individual releases. + + This regular expression: + - Matches lines starting with "## x.x.x". + - Groups the version number. + - Skips the (optional) release date. + - Groups the changelog content. + - Ends when another "## x.x.x" is found. +*/ +const regex = /^## (\d+\.\d+\.\d+).*?\n(.+?)(?=\n^## \d+\.\d+\.\d+.*?\n)/gms; + +let releaseNotes = []; +while (match = regex.exec(changelog)) { + releaseNotes.push({ + 'version': match[1], + 'changelog': match[2].trim(), + }); +} + +/* + Match the current tag with the most appropriate release notes. +*/ +const versionsInReleaseNotes = _.map(releaseNotes, 'version'); +const bestReleaseNotesForCurrentVersion = semver.minSatisfying(versionsInReleaseNotes, ">=" + currentVersion); +const currentReleaseNotes = _.find(releaseNotes, { version: bestReleaseNotesForCurrentVersion }); + +if (!currentReleaseNotes) { + console.error('Could not find a release section satisfying %s in %s — did you forget to rename the "master" section to %s?', currentVersion, changelogPath, currentVersion.split("-")[0]); + process.exit(1); +} + +/* + Fill and print the release notes template. +*/ +let templatedReleaseNotes; + +if (outputMode.isGitHub) { + templatedReleaseNotes = ejs.render(fs.readFileSync('platform/macos/scripts/release-notes-github.md.ejs', 'utf8'), { + 'CURRENTVERSION': currentVersion, + 'PREVIOUSVERSION': previousVersion, + 'CHANGELOG': currentReleaseNotes.changelog, + 'isPrerelease': semver.prerelease(currentVersion) + }); +} + +if (outputMode.isJazzy) { + const minorReleaseSeries = semver.major(currentVersion) + "." + semver.minor(currentVersion) + ".0"; + const range = ">=" + minorReleaseSeries + " <" + currentVersion; + const otherReleasesInSeries = _.filter(releaseNotes, function(release) { + return semver.satisfies(release.version, range); + }); + + otherReleasesInSeries.forEach(function(release) { + // Bump section headings from h3 to h4. + release.changelog = release.changelog.replace(/^### /gm, '#### '); + }); + + templatedReleaseNotes = ejs.render(fs.readFileSync('platform/macos/scripts/release-notes-jazzy.md.ejs', 'utf8'), { + 'CURRENTVERSION': currentVersion, + 'CURRENTCHANGELOG': currentReleaseNotes.changelog, + 'OTHERRELEASES': otherReleasesInSeries + }); +} + +process.stdout.write(templatedReleaseNotes); From 55f41edfb18631878d47760a9f87ad8e2b17b0b7 Mon Sep 17 00:00:00 2001 From: Petr Pokorny Date: Mon, 1 Feb 2021 09:48:52 +0100 Subject: [PATCH 07/11] Testing deploy script --- .../ios/platform/macos/scripts/deploy-packages.sh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/platform/ios/platform/macos/scripts/deploy-packages.sh b/platform/ios/platform/macos/scripts/deploy-packages.sh index 6a18ebc4b..929b6d58c 100755 --- a/platform/ios/platform/macos/scripts/deploy-packages.sh +++ b/platform/ios/platform/macos/scripts/deploy-packages.sh @@ -118,7 +118,7 @@ if [[ $( wget --spider -O- https://api.github.com/repos/${GITHUB_USER}/${GITHUB_ fi PUBLISH_VERSION=$( echo ${VERSION_TAG} | sed 's/^macos-v//' ) -git checkout ${VERSION_TAG} +#git checkout ${VERSION_TAG} step "Deploying version ${PUBLISH_VERSION}…" @@ -142,11 +142,11 @@ if [[ "${GITHUB_RELEASE}" == true ]]; then if [[ $( echo ${PUBLISH_VERSION} | awk '/[0-9]-/' ) ]]; then PUBLISH_PRE_FLAG='--pre-release' fi - github-release release \ - --tag "macos-v${PUBLISH_VERSION}" \ - --name "macos-v${PUBLISH_VERSION}" \ - --description "${RELEASE_NOTES}" \ - --draft ${PUBLISH_PRE_FLAG} + # github-release release \ + # --tag "macos-v${PUBLISH_VERSION}" \ + # --name "macos-v${PUBLISH_VERSION}" \ + # --description "${RELEASE_NOTES}" \ + # --draft ${PUBLISH_PRE_FLAG} fi publish -r xpackage -s symbols From a96af1d78dd6a61fda93f768c69cc508d98eb77c Mon Sep 17 00:00:00 2001 From: Petr Pokorny Date: Mon, 1 Feb 2021 09:49:24 +0100 Subject: [PATCH 08/11] Make sure the code is checked out at the tag being released. --- platform/ios/platform/ios/scripts/deploy-swift-package.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/platform/ios/platform/ios/scripts/deploy-swift-package.sh b/platform/ios/platform/ios/scripts/deploy-swift-package.sh index f59b30faa..8c7c9058e 100755 --- a/platform/ios/platform/ios/scripts/deploy-swift-package.sh +++ b/platform/ios/platform/ios/scripts/deploy-swift-package.sh @@ -95,6 +95,8 @@ if github-release info --tag ${VERSION_TAG} | grep --quiet "draft: ✗"; then fi PUBLISH_VERSION=$( echo ${VERSION_TAG} | sed 's/^ios-v//' ) +git checkout ${VERSION_TAG} + npm install --ignore-scripts mkdir -p ${BINARY_DIRECTORY} From 09640e64af81ae8cd61ef8788a6467afd0a8f2fc Mon Sep 17 00:00:00 2001 From: Petr Pokorny Date: Mon, 1 Feb 2021 10:03:18 +0100 Subject: [PATCH 09/11] Adding one more build step to ensure correct source code revision is used for the release. --- .github/workflows/android-release.yml | 5 ++++ .../android/scripts/ensure-code-revision.sh | 25 +++++++++++++++++++ 2 files changed, 30 insertions(+) create mode 100755 platform/android/scripts/ensure-code-revision.sh diff --git a/.github/workflows/android-release.yml b/.github/workflows/android-release.yml index 5491cf6d6..b85731b98 100644 --- a/.github/workflows/android-release.yml +++ b/.github/workflows/android-release.yml @@ -31,6 +31,11 @@ jobs: submodules: recursive fetch-depth: 0 + - name: Ensure source code revision + run: scripts/ensure-code-revision.sh + working-directory: platform/android + shell: bash + - name: Cache node modules uses: actions/cache@v2 env: diff --git a/platform/android/scripts/ensure-code-revision.sh b/platform/android/scripts/ensure-code-revision.sh new file mode 100755 index 000000000..2da0d55a4 --- /dev/null +++ b/platform/android/scripts/ensure-code-revision.sh @@ -0,0 +1,25 @@ +#!/usr/bin/env bash + +set -e +set -o pipefail +set -u + +function step { >&2 echo -e "\033[1m\033[36m* $@\033[0m"; } +function finish { >&2 echo -en "\033[0m"; } +trap finish EXIT + +VERSION_TAG=${VERSION_TAG:-''} +if [[ -z ${VERSION_TAG} ]]; then + step "Determining version number from most recent relevant git tag…" + VERSION_TAG=$( git describe --tags --match=android-v*.*.* --abbrev=0 ) + echo "Found tag: ${VERSION_TAG}" +fi + +if [[ $( echo ${VERSION_TAG} | grep --invert-match android-v ) ]]; then + echo "Error: ${VERSION_TAG} is not a valid android version tag" + echo "VERSION_TAG should be in format: android-vX.X.X-pre.X" + exit 1 +fi + +step "Checking out source code at ${VERSION_TAG}" +git checkout ${VERSION_TAG} \ No newline at end of file From ad31f4f152fc5994b6d3b8e2eaca45c4e9867f65 Mon Sep 17 00:00:00 2001 From: Petr Pokorny Date: Mon, 1 Feb 2021 10:11:45 +0100 Subject: [PATCH 10/11] testing release script --- platform/ios/platform/macos/scripts/deploy-packages.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/platform/ios/platform/macos/scripts/deploy-packages.sh b/platform/ios/platform/macos/scripts/deploy-packages.sh index 929b6d58c..63a349d7b 100755 --- a/platform/ios/platform/macos/scripts/deploy-packages.sh +++ b/platform/ios/platform/macos/scripts/deploy-packages.sh @@ -47,17 +47,17 @@ publish() { else file_name=mapbox-macos-sdk-${PUBLISH_VERSION}-${suffix}.zip fi - step "Compressing ${file_name}-> ${pwd}../deploy/${file_name}" + step "Compressing ${file_name}-> ${PWD}../deploy/${file_name}" cd build/macos/pkg rm -f ../deploy/${file_name} zip -yr ../deploy/${file_name} * cd - if [[ "${GITHUB_RELEASE}" == true ]]; then echo "Uploading ${file_name} to GitHub" - github-release upload \ - --tag "macos-v${PUBLISH_VERSION}" \ - --name ${file_name} \ - --file "${BINARY_DIRECTORY}/${file_name}" > /dev/null + # github-release upload \ + # --tag "macos-v${PUBLISH_VERSION}" \ + # --name ${file_name} \ + # --file "${BINARY_DIRECTORY}/${file_name}" > /dev/null fi if [ ${app} ]; then file_name="Mapbox GL.app.zip" From 245480b2dbdbc44dc58f85e3f420484816223ee8 Mon Sep 17 00:00:00 2001 From: Petr Pokorny Date: Mon, 1 Feb 2021 10:39:51 +0100 Subject: [PATCH 11/11] Removing debug code --- .../platform/macos/scripts/deploy-packages.sh | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/platform/ios/platform/macos/scripts/deploy-packages.sh b/platform/ios/platform/macos/scripts/deploy-packages.sh index 63a349d7b..f68e20eb8 100755 --- a/platform/ios/platform/macos/scripts/deploy-packages.sh +++ b/platform/ios/platform/macos/scripts/deploy-packages.sh @@ -54,10 +54,10 @@ publish() { cd - if [[ "${GITHUB_RELEASE}" == true ]]; then echo "Uploading ${file_name} to GitHub" - # github-release upload \ - # --tag "macos-v${PUBLISH_VERSION}" \ - # --name ${file_name} \ - # --file "${BINARY_DIRECTORY}/${file_name}" > /dev/null + github-release upload \ + --tag "macos-v${PUBLISH_VERSION}" \ + --name ${file_name} \ + --file "${BINARY_DIRECTORY}/${file_name}" > /dev/null fi if [ ${app} ]; then file_name="Mapbox GL.app.zip" @@ -118,7 +118,7 @@ if [[ $( wget --spider -O- https://api.github.com/repos/${GITHUB_USER}/${GITHUB_ fi PUBLISH_VERSION=$( echo ${VERSION_TAG} | sed 's/^macos-v//' ) -#git checkout ${VERSION_TAG} +git checkout ${VERSION_TAG} step "Deploying version ${PUBLISH_VERSION}…" @@ -142,11 +142,11 @@ if [[ "${GITHUB_RELEASE}" == true ]]; then if [[ $( echo ${PUBLISH_VERSION} | awk '/[0-9]-/' ) ]]; then PUBLISH_PRE_FLAG='--pre-release' fi - # github-release release \ - # --tag "macos-v${PUBLISH_VERSION}" \ - # --name "macos-v${PUBLISH_VERSION}" \ - # --description "${RELEASE_NOTES}" \ - # --draft ${PUBLISH_PRE_FLAG} + github-release release \ + --tag "macos-v${PUBLISH_VERSION}" \ + --name "macos-v${PUBLISH_VERSION}" \ + --description "${RELEASE_NOTES}" \ + --draft ${PUBLISH_PRE_FLAG} fi publish -r xpackage -s symbols