Skip to content
This repository was archived by the owner on Feb 5, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
51 changes: 51 additions & 0 deletions .buildkite/pipeline.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# Nodes with values to reuse in the pipeline.
common_params:
plugins: &common_plugins
- &bash_cache automattic/bash-cache#v1.5.0: ~
env: &common_env
IMAGE_ID: xcode-12.5.1

# This is the default pipeline – it will build and test the pod
steps:
#################
# Build and Test
#################
- label: "🧪 Build and Test"
key: "test"
command: "build_and_test_pod"
env: *common_env
plugins: *common_plugins

#################
# Validate Podspec
#################
- label: "🔬 Validating Podspec"
key: "validate"
command: "validate_podspec"
env: *common_env
plugins: *common_plugins

#################
# Lint
#################
- label: "🧹 Lint"
key: "lint"
command: "lint_pod"
env: *common_env
plugins: *common_plugins

#################
# Publish the Podspec (if we're building a tag)
#################
- label: "⬆️ Publish Podspec"
key: "publish"
command: .buildkite/publish-pod.sh
env: *common_env
plugins: *common_plugins
depends_on:
- "test"
- "validate"
- "lint"
if: build.tag != null
agents:
queue: "mac"
17 changes: 17 additions & 0 deletions .buildkite/publish-pod.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#!/bin/bash -eu

PODSPEC_PATH="WordPressAuthenticator.podspec"
SPECS_REPO="git@github.com:wordpress-mobile/cocoapods-specs.git"
SLACK_WEBHOOK=$PODS_SLACK_WEBHOOK

echo "--- :rubygems: Setting up Gems"
install_gems

echo "--- :cocoapods: Publishing Pod to CocoaPods CDN"
publish_pod $PODSPEC_PATH

echo "--- :cocoapods: Publishing Pod to WP Specs Repo"
publish_private_pod $PODSPEC_PATH $SPECS_REPO "$SPEC_REPO_PUBLIC_DEPLOY_KEY"

echo "--- :slack: Notifying Slack"
slack_notify_pod_published $PODSPEC_PATH $SLACK_WEBHOOK
19 changes: 2 additions & 17 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ orbs:

# YAML anchors for some common/repeated values
x-common-params:
- &xcode-version "12.2.0"
- &xcode-version "12.5.0"
- &podspec "WordPressAuthenticator.podspec"
- &on-tags-only
tags:
Expand All @@ -23,26 +23,11 @@ workflows:
workspace: WordPressAuthenticator.xcworkspace
scheme: WordPressAuthenticator
device: iPhone 11
ios-version: "14.2"
ios-version: "14.5"
bundle-install: true
pod-install: true
- ios/validate-podspec:
name: Validate Podspec
xcode-version: *xcode-version
podspec-path: *podspec
bundle-install: true
- ios/publish-podspec:
name: Publish to a8c Spec Repo
xcode-version: *xcode-version
podspec-path: *podspec
spec-repo: https://github.com/wordpress-mobile/cocoapods-specs.git
bundle-install: true
post-to-slack: false
filters: *on-tags-only
- ios/publish-podspec:
name: Publish to Trunk
xcode-version: *xcode-version
podspec-path: *podspec
bundle-install: true
post-to-slack: true
filters: *on-tags-only
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

# Xcode
#
.build
build/
*.pbxuser
!default.pbxuser
Expand All @@ -28,3 +29,8 @@ DerivedData
Pods/

/vendor

# Fastlane
fastlane/README.md
fastlane/report.xml
fastlane/test_output
16 changes: 16 additions & 0 deletions .rubocop.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Opt in to new cops by default
AllCops:
NewCops: enable

# Allow the Podspec filename to match the project
Naming/FileName:
Exclude:
- 'WordPressAuthenticator.podspec'

Metrics/BlockLength:
Exclude:
- 'WordPressAuthenticator.podspec'

# Override the maximum line length
Layout/LineLength:
Max: 160
2 changes: 1 addition & 1 deletion .ruby-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.6.5
2.6.4
6 changes: 5 additions & 1 deletion Gemfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
# frozen_string_literal: true

source 'https://rubygems.org'

gem 'cocoapods', '~> 1.10.0'
gem 'cocoapods', '~> 1.10'
gem 'cocoapods-check', '~> 1.1'
gem 'fastlane', '~> 2.189'
gem 'rubocop', '~> 1.18'
Loading