Compare commits

...

25 Commits

Author SHA1 Message Date
Jonas Franz 9fbdd2d709
Add download ios artifacts 2018-10-08 17:57:43 +02:00
Jonas Franz f2b7bb0bc3
Fix dockerfile 2018-10-08 17:08:12 +02:00
Jonas Franz ca7bf35f7b
Add scp docker image 2018-10-08 16:58:55 +02:00
Jonas Franz fcf0d9ecf9
Merge branch 'master' of ssh://git.kolaente.de:9022/vikunja/app into feature/drone-ios 2018-10-08 16:31:08 +02:00
Jonas Franz e617d93ee0
Fix xcode project 2018-09-24 10:55:59 +02:00
Jonas Franz dad730ed1c
Cleanup 2018-09-23 22:59:03 +02:00
Jonas Franz b04307013f
Start bin bash 2018-09-23 22:47:56 +02:00
Jonas Franz 21fdec0aa8
Add /bin/bash 2018-09-23 22:45:36 +02:00
Jonas Franz b77ce08243
Revert "Start bin bash"
This reverts commit d87fcd5
2018-09-23 22:45:13 +02:00
Jonas Franz d87fcd57d1
Start bin bash 2018-09-23 22:44:51 +02:00
Jonas Franz 9481dd09e4
Add Podfile 2018-09-23 22:41:45 +02:00
Jonas Franz 7e1e8f2d61
Add ls lah 2018-09-23 22:35:07 +02:00
Jonas Franz 554f23a981
Use correct filename 2018-09-23 22:32:39 +02:00
Jonas Franz d0cda640c3
Outputting catfile 2018-09-23 22:32:22 +02:00
Jonas Franz 2483c1b2eb
Use correct path for remote build 2018-09-23 22:30:30 +02:00
Jonas Franz 79fb00afb7
Add echo 2018-09-23 22:29:18 +02:00
Jonas Franz 73edc6583c
Install cocoapods 2018-09-23 22:26:07 +02:00
Jonas Franz 7b37a7c400
Add longer timeout to SSH build 2018-09-23 22:22:14 +02:00
Jonas Franz cfe9befdfa
Move export statement to correct position 2018-09-23 22:19:14 +02:00
Jonas Franz 5dda43a97b
Change macos port 2018-09-23 22:17:07 +02:00
Jonas Franz f0a9cd52c9
Fix drone 2018-09-23 21:32:12 +02:00
Jonas Franz e830e24d36
Add flutter path 2018-09-23 16:52:34 +02:00
Jonas Franz fa5d3eba44
Fix make file
Add clean ios step
2018-09-23 16:45:25 +02:00
Jonas Franz 3c53045598
Add build_ios 2018-09-23 16:40:29 +02:00
Jonas Franz 1add0c89c1
Upload code to vm 2018-09-23 16:18:06 +02:00
8 changed files with 144 additions and 1 deletions

View File

@ -8,6 +8,16 @@ clone:
tags: true
pipeline:
upload_to_macos:
image: appleboy/drone-scp
host: home.jonasfranz.software
secrets: [ ssh_username, ssh_key ]
port: 2222
source: ./
target: /tmp/drone_build_${DRONE_BUILD_NUMBER}
when:
event: [ push, tag]
test:
image: nathansamson/flutter-builder-docker:v0.6.0
pull: true
@ -18,6 +28,7 @@ pipeline:
build:
image: nathansamson/flutter-builder-docker:v0.6.0
group: build
pull: true
commands:
- flutter packages get
@ -26,6 +37,32 @@ pipeline:
- mv build/app/outputs/apk/*/*/*.apk apks
when:
event: [ push, tag ]
build_ios:
image: appleboy/drone-ssh
group: build
host: home.jonasfranz.software
port: 2222
secrets: [ ssh_username, ssh_key ]
command_timeout: 900
script:
- source ~/.bash_profile
- export EXPANDED_CODE_SIGN_IDENTITY=""
- cd /tmp/drone_build_${DRONE_BUILD_NUMBER}/ios
- pod install
- cd ..
- flutter packages get
- make build-ios-all
when:
event: [ push, tag ]
download_ios_artifacts:
image: vikunja/scp
secrets: [ ssh_username, ssh_key ]
commands:
- echo $ssh_key | scp -P 2222 -i /dev/stdin ${ssh_username}@home.jonasfranz.software:/tmp/drone_build_${DRONE_BUILD_NUMBER}/build/ios/iphoneos/* apks/
when:
event: [ push, tag ]
# Push the releases to our pseudo-s3-bucket
release:
@ -55,3 +92,14 @@ pipeline:
when:
event: [ push ]
branch: [ master ]
clean_ios:
image: appleboy/drone-ssh
host: home.jonasfranz.software
port: 2222
secrets: [ ssh_username, ssh_key ]
script:
- rm -rf /tmp/drone_build_${DRONE_BUILD_NUMBER}
when:
status: [ failure, success ]
event: [ push, tag]

Binary file not shown.

View File

@ -0,0 +1,2 @@
#Sat Sep 15 16:48:22 CEST 2018
gradle.version=4.4

3
Dockerfile.scp Normal file
View File

@ -0,0 +1,3 @@
FROM alpine
RUN apk add --no-cache openssh-client
RUN mkdir ~/.ssh && ssh-keyscan -H home.jonasfranz.software -P 2222 >> ~/.ssh/known_hosts

View File

@ -28,3 +28,20 @@ build-debug:
.PHONY: build-profile
build-profile:
flutter build apk --profile --build-name=$(VERSION) --flavor unsigned
.PHONY: build-ios-all
build-ios-all: build-ios-release build-ios-debug build-ios-profile
.PHONY: build-ios-release
build-ios-release:
flutter build ios --release --build-name=$(VERSION) --no-codesign
.PHONY: build-ios-debug
build-ios-debug:
flutter build ios --debug --build-name=$(VERSION) --no-codesign
mv build/ios/iphoneos/Runner.app build/ios/iphoneos/Runner-debug.app
.PHONY: build-ios-profile
build-ios-profile:
flutter build ios --profile --build-name=$(VERSION) --no-codesign
mv build/ios/iphoneos/Runner.app build/ios/iphoneos/Runner-profile.app

65
ios/Podfile Normal file
View File

@ -0,0 +1,65 @@
# Uncomment this line to define a global platform for your project
# platform :ios, '9.0'
# CocoaPods analytics sends network stats synchronously affecting flutter build latency.
ENV['COCOAPODS_DISABLE_STATS'] = 'true'
def parse_KV_file(file, separator='=')
file_abs_path = File.expand_path(file)
if !File.exists? file_abs_path
return [];
end
pods_ary = []
skip_line_start_symbols = ["#", "/"]
File.foreach(file_abs_path) { |line|
next if skip_line_start_symbols.any? { |symbol| line =~ /^\s*#{symbol}/ }
plugin = line.split(pattern=separator)
if plugin.length == 2
podname = plugin[0].strip()
path = plugin[1].strip()
podpath = File.expand_path("#{path}", file_abs_path)
pods_ary.push({:name => podname, :path => podpath});
else
puts "Invalid plugin specification: #{line}"
end
}
return pods_ary
end
target 'Runner' do
use_frameworks!
# Prepare symlinks folder. We use symlinks to avoid having Podfile.lock
# referring to absolute paths on developers' machines.
system('rm -rf .symlinks')
system('mkdir -p .symlinks/plugins')
# Flutter Pods
generated_xcode_build_settings = parse_KV_file('./Flutter/Generated.xcconfig')
if generated_xcode_build_settings.empty?
puts "Generated.xcconfig must exist. If you're running pod install manually, make sure flutter packages get is executed first."
end
generated_xcode_build_settings.map { |p|
if p[:name] == 'FLUTTER_FRAMEWORK_DIR'
symlink = File.join('.symlinks', 'flutter')
File.symlink(File.dirname(p[:path]), symlink)
pod 'Flutter', :path => File.join(symlink, File.basename(p[:path]))
end
}
# Plugin Pods
plugin_pods = parse_KV_file('../.flutter-plugins')
plugin_pods.map { |p|
symlink = File.join('.symlinks', 'plugins', p[:name])
File.symlink(p[:path], symlink)
pod p[:name], :path => File.join(symlink, 'ios')
}
end
post_install do |installer|
installer.pods_project.targets.each do |target|
target.build_configurations.each do |config|
config.build_settings['ENABLE_BITCODE'] = 'NO'
end
end
end

View File

@ -14,7 +14,7 @@
3B80C3951E831B6300D905FE /* App.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 3B80C3931E831B6300D905FE /* App.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; };
9705A1C61CF904A100538489 /* Flutter.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9740EEBA1CF902C7004384FC /* Flutter.framework */; };
9705A1C71CF904A300538489 /* Flutter.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 9740EEBA1CF902C7004384FC /* Flutter.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
9705A1C71CF904A300538489 /* Flutter.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 9740EEBA1CF902C7004384FC /* Flutter.framework */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; };
9740EEB41CF90195004384FC /* Debug.xcconfig in Resources */ = {isa = PBXBuildFile; fileRef = 9740EEB21CF90195004384FC /* Debug.xcconfig */; };
97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; };
97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; };

View File

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>IDEDidComputeMac32BitWarning</key>
<true/>
</dict>
</plist>