Skip to content

Commit

Permalink
WIP – Ditch the whole local spec idea and refer to a remote one 🤦‍♂️
Browse files Browse the repository at this point in the history
  • Loading branch information
mokagio committed Jun 2, 2023
1 parent 2d5bed0 commit 9f9705b
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 100 deletions.
78 changes: 0 additions & 78 deletions Gutenberg/Gutenberg.podspec

This file was deleted.

11 changes: 2 additions & 9 deletions Gutenberg/cocoapods_helpers.rb
Original file line number Diff line number Diff line change
Expand Up @@ -89,9 +89,7 @@ def gutenberg_pod(config: GUTENBERG_CONFIG)

gutenberg_dependencies(options: options)
elsif options[:commit]
# Notice the use of relative path, otherwise we'd get the full path of the user that run the `pod install` command tracked in Podfile.lock.
# Also notice the path is relative from Dir.pwd, that is, the location where the script running this code is invoked to avoid absolute paths making the checksum non determinstic.
pod 'Gutenberg', path: Pathname.new(File.join(__dir__, 'Gutenberg.podspec')).relative_path_from(Dir.pwd).to_s
pod 'Gutenberg', podspec: "https://d2twmm2nzpx3bg.cloudfront.net/Gutenberg-#{options[:commit]}.podspec"
end
end
# rubocop:enable Metrics/AbcSize
Expand All @@ -103,7 +101,7 @@ def gutenberg_dependencies(options:)
tag = options[:tag]
podspec_prefix = "https://raw.githubusercontent.com/#{GITHUB_ORG}/#{REPO_NAME}/#{tag}"
elsif options[:commit]
return # when referencing via a commit, we donwload pre-built frameworks
return # when referencing via a commit, we download pre-built frameworks
else
raise "Unexpected Gutenberg dependencies configuration '#{options}'"
end
Expand All @@ -118,8 +116,3 @@ def gutenberg_dependencies(options:)
pod pod_name, podspec: "#{podspec_prefix}/#{pod_name}.#{podspec_extension}"
end
end

def archive_url(commit:)
xcframework_storage_url = 'https://d2twmm2nzpx3bg.cloudfront.net'
"#{xcframework_storage_url}/Gutenberg-#{commit}.tar.gz"
end
10 changes: 0 additions & 10 deletions Gutenberg/version.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,3 @@

GITHUB_ORG = 'wordpress-mobile'
REPO_NAME = 'gutenberg-mobile'

# The root working directory for downloading and extracting archives.
# In this location because multiple sources access it.
#
# This path should be ignored by Git.
GUTENBERG_WORKING_DIRECTORY = File.join(__dir__, '.build')
# Where to download the XCFramework archives
GUTENBERG_DOWNLOADS_DIRECTORY = File.join(GUTENBERG_WORKING_DIRECTORY, 'downloads')
# Where to extract the XCFramework archive version to use for the build.
GUTENBERG_ARCHIVE_DIRECTORY = File.join(GUTENBERG_WORKING_DIRECTORY, 'archive')
6 changes: 3 additions & 3 deletions Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ DEPENDENCIES:
- FSInteractiveMap (from `https://github.com/wordpress-mobile/FSInteractiveMap.git`, tag `0.2.0`)
- Gifu (= 3.2.0)
- Gridicons (~> 1.1.0)
- Gutenberg (from `Gutenberg/Gutenberg.podspec`)
- Gutenberg (from `https://d2twmm2nzpx3bg.cloudfront.net/Gutenberg-b24b84849081f4d3846f2c1a5868764283be5aad.podspec`)
- JTAppleCalendar (~> 8.0.2)
- Kanvas (~> 1.4.4)
- MediaEditor (~> 1.2.1)
Expand Down Expand Up @@ -226,7 +226,7 @@ EXTERNAL SOURCES:
:git: https://github.com/wordpress-mobile/FSInteractiveMap.git
:tag: 0.2.0
Gutenberg:
:path: Gutenberg/Gutenberg.podspec
:podspec: https://d2twmm2nzpx3bg.cloudfront.net/Gutenberg-b24b84849081f4d3846f2c1a5868764283be5aad.podspec
WordPressShared:
:branch: trunk
:git: https://github.com/wordpress-mobile/WordPress-iOS-Shared.git
Expand Down Expand Up @@ -255,7 +255,7 @@ SPEC CHECKSUMS:
Gridicons: 17d660b97ce4231d582101b02f8280628b141c9a
GTMAppAuth: 0ff230db599948a9ad7470ca667337803b3fc4dd
GTMSessionFetcher: 5595ec75acf5be50814f81e9189490412bad82ba
Gutenberg: 288b6bead2d6bdc78b95f1a00f6bdc901578927e
Gutenberg: 7db906bba665170651d95db110d21599105ef820
JTAppleCalendar: 932cadea40b1051beab10f67843451d48ba16c99
Kanvas: f932eaed3d3f47aae8aafb6c2d27c968bdd49030
MediaEditor: 20cdeb46bdecd040b8bc94467ac85a52b53b193a
Expand Down

0 comments on commit 9f9705b

Please sign in to comment.