Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mongo 6 upgrade #27

Merged
merged 5 commits into from
Aug 10, 2022
Merged

Mongo 6 upgrade #27

merged 5 commits into from
Aug 10, 2022

Conversation

StefanoDeVuono
Copy link
Contributor

@StefanoDeVuono StefanoDeVuono commented Jul 23, 2022

Hi @gcollazo et al,

I was upgrading to Mongo 5 and by the time I got that working, version 6 was available. So, here goes:

I made some changes to allow an upgrade to Mongo 5 6.
Overview:

convert to swift 5: I made a small update to Swift 5 syntax
upgrade to mongo 5: Finally I updated the Info.plist and update.sh files.
delete sparkle framework, add sparkle as swift package: I updated Sparkle to version 2 (without changing from the deprecated SUUpdater class)
build working; mongo 6: I fixed the build to work with Sparkle as a Swift package and ran the update.sh script. Lo and behold, we're on Mongo 6

Details:

  • convert to swift 5: The Swift syntax change was very small.
  • upgrade to mongo 5: The update.sh was changed as mongo's download page has changed slightly. Feel free to test the curl command used to find the most recent version:
 curl -Ls https://www.mongodb.com/download-center/community | \
    grep -o ',[^,]*"current":true,' | \
    head -n 1 | \
    grep -o '[0-9]*\.[0-9]*\.[0-9]*'

The download page format has changed and can no longer be parsed for option tags, I parse the versions are stored in JSON, although there are other solutions (I could try parsing the html and there's a current.json endpoint mongo provides; however, between parsing HTML, JSON within HTML or a JSON endpoint and without being able to guarantee that a user has jq installed, it feels like there's no great solution.)

  • delete sparkle framework, add sparkle as swift package: Sparkle is deprecating the SUUpdater class and switching to a new system of deltas. However the current class and system of deltas from Sparkle 1.18 is still supported for now.
    I updated the build target to from 10.9 to 10.11 to support the new version of Sparkle.
  • build working; mongo 6: I fixed the build to work with Sparkle as a Swift package and ran the update.sh script. Lo and behold, we're on Mongo 6

cleanup references to frameworks in project file

import sparkle

delete scheme and remove bridging file
@StefanoDeVuono StefanoDeVuono marked this pull request as ready for review July 23, 2022 10:04
@gcollazo
Copy link
Owner

I will review later in the week. Thanks for the PR.

Copy link
Owner

@gcollazo gcollazo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 Looks good to me

@gcollazo gcollazo merged commit b8d541a into gcollazo:master Aug 10, 2022
@gcollazo
Copy link
Owner

Published: https://gcollazo.github.io/mongodbapp/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants