Skip to content

Update Project Pod

husnjak edited this page Oct 25, 2023 · 4 revisions

IMPORTANT

This Wiki is not for the PUBLIC, more for my self to "remember" how to update this projects cocoapods

Update Proto file

  1. Download the new one here
  2. Convert the file into a GIANT file of Swift structs using the swift-protobuf library.
# Go to the directory where the .proto file lies and run this command:
$ protoc --swift_opt=Visibility=Public --swift_out=. IGDBProtoFile.proto
  1. Copy the new file "IGDBProtoFile.pb.swift" to the APIStructs folder, now the structs for the wrapper are updated.
  2. Update the podspec file with a new version number
  3. Test the project using pod lint. Run these commands from where the podspec file is located.
$ pod spec lint
$ pod lib lint
  1. Push to Github and create a new Release with the same version as the podspec!
  2. Test the wrapper in a test project.

Update TRUNK_TOKEN secret

The Trunk token secret is used by Github Actions to push releases to Cocoapods. Must have register to cocoapod trunk. Please refer to Getting setup with Trunk on how to register.

Get your trunk token by using pod trunk me --verbose from your command line.

Example response:

opening connection to trunk.cocoapods.org:443...
opened
starting SSL for trunk.cocoapods.org:443...
SSL established, protocol: TLSv1.2, cipher: ECDHE-RSA-AES128-GCM-SHA256
<- "GET /api/v1/sessions HTTP/1.1\r\nContent-Type: application/json; charset=utf-8\r\nAccept: application/json; charset=utf-8\r\nUser-Agent: CocoaPods/1.7.4\r\nAuthorization: Token XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\r\nAccept-Encoding: gzip;q=1.0,deflate;q=0.6,identity;q=0.3\r\nHost: trunk.cocoapods.org\r\n\r\n"
-> "HTTP/1.1 200 OK\r\n"
-> "Date: Sun, 22 Sep 2019 05:11:46 GMT\r\n"
-> "Connection: keep-alive\r\n"
-> "Strict-Transport-Security: max-age=31536000\r\n"
-> "Content-Type: application/json\r\n"
-> "Content-Length: 1491\r\n"
-> "X-Content-Type-Options: nosniff\r\n"
-> "Server: thin 1.6.2 codename Doc Brown\r\n"
-> "Via: 1.1 vegur\r\n"
-> "\r\n"

Please get only the XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX as your trunk token.

register the your trunk token as Secrets and named it as TRUNK_TOKEN.

Clone this wiki locally