Skip to content

Instantly share code, notes, and snippets.

@mitsuse
Created December 28, 2017 17:01
Show Gist options
  • Save mitsuse/1be64a35682446c44f6905efac65eb33 to your computer and use it in GitHub Desktop.
Save mitsuse/1be64a35682446c44f6905efac65eb33 to your computer and use it in GitHub Desktop.
Automate linting and pushing a podspec on Bitrise.io.
format_version: 1.4.0
default_step_lib_source: https://github.com/bitrise-io/bitrise-steplib.git
workflows:
deploy:
after_run:
- ensure_clean
- test
- lint_spec
- push_spec
build:
after_run:
- test
- lint_spec
test:
steps:
- script@1.1.3:
title: 'swift test'
inputs:
- content: TEST=1 swift test
push_spec:
steps:
- script@1.1.3:
title: 'pod repo add'
inputs:
- content: |-
if [ ! -d $HOME/.cocoapods/repos/${NAME_POD_REPO} ]; then
pod repo add ${NAME_POD_REPO} git@github.com:${NAME_POD_REPO}/pods.git
fi
- script@1.1.3:
title: 'pod repo push'
inputs:
- content: pod repo push ${NAME_POD_REPO} ${NAME_POD}.podspec --allow-warnings
lint_spec:
steps:
- script@1.1.3:
title: 'pod lib lint'
inputs:
- content: |-
pod lib lint ${NAME_POD}.podspec \
--allow-warnings \
--sources="https://github.com/CocoaPods/Specs.git,git@github.com:${NAME_POD_REPO}/pods.git"
ensure_clean:
steps:
- ensure-clean-git@0.9.1:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment