Skip to content

Commit b533fe2

Browse files
authored
Merge pull request #312 from wordpress-mobile/remove/drawtext-as-direct-dependency
Remove drawtext as direct dependency
2 parents da405f2 + 9913017 commit b533fe2

40 files changed

+36
-1480
lines changed

.buildkite/brewfile

Lines changed: 0 additions & 4 deletions
This file was deleted.

.buildkite/gem-push.sh

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
#!/bin/bash -eu
22

3-
.buildkite/install-dependencies.sh
4-
53
echo "--- :hammer: Build Gemspec"
64
gem build fastlane-plugin-wpmreleasetoolkit.gemspec
75

.buildkite/install-dependencies.sh

Lines changed: 0 additions & 7 deletions
This file was deleted.

.buildkite/pipeline.yml

Lines changed: 31 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,21 @@
11
# Nodes with values to reuse in the pipeline.
22
common_params:
3-
plugins: &common_plugins
4-
- &bash_cache automattic/bash-cache#2.0.0: ~
5-
env: &common_env
3+
env: &xcode_image
64
IMAGE_ID: xcode-12.5.1
5+
plugins:
6+
- &docker_plugin
7+
docker#v3.8.0:
8+
image: &ruby_version "ruby:2.7.4"
9+
propagate-environment: true
10+
environment:
11+
- "RUBYGEMS_API_KEY"
12+
- &docker_plugin_with_danger_token
13+
docker#v3.8.0:
14+
image: *ruby_version
15+
propagate-environment: true
16+
environment:
17+
- "DANGER_GITHUB_API_TOKEN"
18+
719

820
steps:
921
#################
@@ -12,18 +24,20 @@ steps:
1224
- label: "🧪 Build and Test"
1325
key: test
1426
command: |
15-
.buildkite/install-dependencies.sh
16-
17-
echo "--- :hammer: Build DrawText"
18-
bundle exec rake compile
27+
# We only need this for tasks running on a Mac
28+
brew install pkg-config git-lfs libxml2 imagemagick@6
1929
2030
echo "--- :git: Setting up git-lfs"
2131
git-lfs install
2232
33+
echo "--- :rubygems: Setting up Gems"
34+
install_gems
35+
2336
echo "--- :rspec: Run Rspec"
2437
bundle exec rspec --profile 10 --format progress
25-
env: *common_env
26-
plugins: *common_plugins
38+
env: *xcode_image
39+
plugins:
40+
automattic/bash-cache#2.0.0: ~
2741
agents:
2842
queue: "mac"
2943

@@ -33,29 +47,25 @@ steps:
3347
- label: "🧹 Lint (Rubocop)"
3448
key: rubocop
3549
command: |
36-
.buildkite/install-dependencies.sh
37-
50+
bundle install
3851
echo "--- :rubocop: Run Rubocop"
3952
bundle exec rubocop
40-
env: *common_env
41-
plugins: *common_plugins
53+
plugins: [*docker_plugin]
4254
agents:
43-
queue: "mac"
55+
queue: "default"
4456

4557
#################
4658
# Danger
4759
#################
4860
- label: "⛔️ Danger"
4961
key: danger
5062
command: |
51-
.buildkite/install-dependencies.sh
52-
63+
bundle install
5364
echo "--- :rubocop: Run Danger"
5465
bundle exec danger
55-
env: *common_env
56-
plugins: *common_plugins
66+
plugins: [*docker_plugin_with_danger_token]
5767
agents:
58-
queue: "mac"
68+
queue: "default"
5969

6070
#################
6171
# Push to RubyGems
@@ -71,7 +81,6 @@ steps:
7181
# commands written inline) to avoid leaking a key used in the process in clear in the
7282
# BUILDKITE_COMMAND environment variable.
7383
command: .buildkite/gem-push.sh
74-
env: *common_env
75-
plugins: *common_plugins
84+
plugins: [*docker_plugin]
7685
agents:
77-
queue: "mac"
86+
queue: "default"

.gitignore

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,6 @@ coverage/
1818
# YARD Documentation
1919
yard-doc/
2020

21-
# DrawText
22-
lib/drawText
23-
lib/drawText.bundle
24-
ext/drawText/drawText.xcodeproj/xcuserdata
25-
ext/drawText/drawText.xcodeproj/project.xcworkspace/xcuserdata
26-
ext/drawText/test-output
27-
default.profraw
28-
2921
# L10n Linter
3022
vendor/swiftgen
3123

.rubocop_todo.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,8 +83,6 @@ Naming/PredicateName:
8383
# SupportedStyles: snake_case, camelCase
8484
Naming/VariableName:
8585
Exclude:
86-
- 'bin/drawText'
87-
- 'ext/drawText/extconf.rb'
8886
- 'lib/fastlane/plugin/wpmreleasetoolkit/actions/common/promo_screenshots_action.rb'
8987
- 'lib/fastlane/plugin/wpmreleasetoolkit/actions/configure/configure_add_files_to_copy_action.rb'
9088
- 'lib/fastlane/plugin/wpmreleasetoolkit/actions/configure/configure_validate_action.rb'

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
### Breaking Changes
88

9-
_None_
9+
* Removes the `drawText` binary from the gem (instead depending on it being installed via `brew`). Because this update can not be safely applied with no side effects, it's considered a breaking change.
1010

1111
### New Features
1212

Rakefile

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -30,17 +30,9 @@ task :docstats, [:path] do |_, args|
3030
sh('yard', 'stats', '--list-undoc', path)
3131
end
3232

33-
Rake::ExtensionTask.new('drawText')
34-
3533
GEM_NAME = 'fastlane-plugin-wpmreleasetoolkit'.freeze
3634
VERSION_FILE = File.join('lib', 'fastlane', 'plugin', 'wpmreleasetoolkit', 'version.rb')
3735

38-
desc 'Try to build and install the gem to ensure it can be installed properly (with the native extension and all)'
39-
task :check_install_gem do
40-
require_relative(VERSION_FILE)
41-
check_install(Fastlane::Wpmreleasetoolkit::VERSION)
42-
end
43-
4436
desc 'Create a new version of the release-toolkit gem'
4537
task :new_release do
4638
require_relative(VERSION_FILE)
@@ -66,10 +58,6 @@ task :new_release do
6658
Console.header 'Updating CHANGELOG...'
6759
parser.update_for_new_release(new_version: new_version)
6860

69-
## Ensure the gem builds and is installable
70-
Console.header 'Testing that the gem builds and installs...'
71-
check_install(new_version)
72-
7361
# Commit and push
7462
Console.header 'Commit and push changes...'
7563
GitHelper.commit_files("Bumped to version #{new_version}", [VERSION_FILE, 'Gemfile.lock', 'CHANGELOG.md'])
@@ -100,10 +88,3 @@ def update_version_constant(version_file, new_version)
10088

10189
sh('bundle', 'install', '--quiet') # To update Gemfile.lock with new wpmreleasetoolkit version
10290
end
103-
104-
def check_install(version)
105-
sh('gem', 'build', "#{GEM_NAME}.gemspec")
106-
Dir.mktmpdir('release-toolkit-') do |tmpdir|
107-
sh('gem', 'install', '--install-dir', tmpdir, '--silent', '--no-document', "#{GEM_NAME}-#{version}.gem")
108-
end
109-
end

bin/drawText

Lines changed: 0 additions & 20 deletions
This file was deleted.

ext/drawText/.gitignore

Lines changed: 0 additions & 7 deletions
This file was deleted.

0 commit comments

Comments
 (0)