Skip to content

Commit cc0c87d

Browse files
committed
test(travis.yml): add podspec tests
1 parent b85a5bc commit cc0c87d

3 files changed

Lines changed: 32 additions & 0 deletions

File tree

.travis.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,12 @@ osx_image: xcode9.2
22
language: objective-c
33

44
script:
5+
# Test generate script
6+
- ./scripts/generate.rb
7+
- ./scripts/check-git-dirty.sh
8+
9+
# Lint podspec
10+
- pod lib lint HolidayJp.podspec
11+
12+
# Run tests
513
- swift test

HolidayJp.podspec

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,15 @@ Pod::Spec.new do |s|
77
s.author = { 'Pine Mizune' => 'pinemz@gmail.com' }
88
s.source = { :git => 'https://github.com/pine/holiday_jp-swift.git', :tag => s.version.to_s }
99
s.source_files = 'Sources/**/*'
10+
11+
s.requires_arc = true
12+
s.osx.deployment_target = '10.9'
13+
s.ios.deployment_target = '8.0'
14+
s.watchos.deployment_target = '2.0'
15+
s.tvos.deployment_target = '9.0'
16+
s.pod_target_xcconfig = {
17+
'SWIFT_VERSION' => '4.0',
18+
}
1019
end
1120

1221
# vim: se sw=2 ts=2 sts=2 et ft=ruby :

scripts/check-git-dirty.sh

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
#!/bin/bash
2+
3+
set -eu
4+
5+
if [ -n "$(git diff --raw)" ]; then
6+
echo "git repository is dirty"
7+
git diff --raw
8+
exit 1
9+
fi
10+
11+
if [ -n "$(git diff --cached --raw)" ]; then
12+
echo "git repository is dirty"
13+
git diff --cached --raw
14+
exit 1
15+
fi

0 commit comments

Comments
 (0)