Skip to content

Conversation

@kmahar
Copy link
Contributor

@kmahar kmahar commented May 23, 2019

Adds a release script. For obvious reasons, I have not actually executed the full script in our repo and cannot say with certainty that this will work in its entirety, but I have tested most of it in pieces.

@$(call check_for_gem,xcodeproj)
ruby Tests/Scripts/add_json_files.rb

sourcery:
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Since sourcery is now also used to update MongoSwift.swift I renamed this to be more specific.

install: ./Tests/Scripts/install_dependencies.sh sourcery
before_script: skip
script: ${PWD}/sourcery/bin/sourcery; git diff --exit-code Tests/LinuxMain.swift
script: export sourcery=${PWD}/sourcery/bin/sourcery; make linuxmain; git diff --exit-code Tests/LinuxMain.swift
Copy link
Contributor Author

Choose a reason for hiding this comment

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

export needed so makefile can find sourcery

@kmahar kmahar requested review from mbroadst and patrickfreed May 23, 2019 22:38
@kmahar
Copy link
Contributor Author

kmahar commented May 23, 2019

Once we have consensus on this I can add a similar script to the mobile repo.

@@ -0,0 +1,30 @@
// swiftlint:disable:previous vertical_whitespace
Copy link
Member

Choose a reason for hiding this comment

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

Two thoughts:

  • could we just have a MongoSwiftVersion.swift (or Version.swift) that adds a private static let versionString to the right namespace. It seems like there is other stuff going on in this file that we don't want to be templated
  • somewhat crazier, but could be nice, can you encode the version into the Package.swift and dynamically read it from that file at runtime? Package.swift will always be there, in a known fixed location

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I went with the first!

rm ${PWD}/MongoSwift.podspec

# go to GitHub to publish release notes
open "https://github.com/mongodb/mongo-swift-driver/releases/tag/v${1}"
Copy link
Member

Choose a reason for hiding this comment

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

very nice 👏

@kmahar kmahar requested a review from mbroadst May 30, 2019 17:51
Copy link
Member

@mbroadst mbroadst left a comment

Choose a reason for hiding this comment

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

LGTM!

@kmahar kmahar merged commit 57a9da4 into master Jun 3, 2019
@kmahar kmahar deleted the SWIFT-134/release-script branch June 3, 2019 16:40
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.

4 participants