Commit cfe62063 authored by 曹云霄's avatar 曹云霄

增加fastlane自动化构建

parent 5ee6ffec
......@@ -61,9 +61,6 @@
PromotionLuckyDrawModel *drawModel = (PromotionLuckyDrawModel *)model;
drawPrice = @{@"price":[NSString stringWithFormat:@"%@",self.model.number],@"priority":@(drawModel.priority)};
}else if ([model isMemberOfClass:[PromotionalGoodsModel class]]) {
//送商品
// PromotionalGoodsModel *goodsModel = (PromotionalGoodsModel *)model;
}
}
NSString *goodsAllPriceString = [self promotionSorting:deductionPrice andWeChatPrice:weChatPrice andDrawPrice:drawPrice andAllPrice:allPrice];
......
......@@ -36,6 +36,7 @@
self.orderNumberLabel.text = model.orderNumber;
self.orderTimelabel.text = model.orderTime;
self.uploadReceiptsButton.hidden = ([self.stateString isEqualToString:STUDYTASKSTATE_REFUSE] || [self.stateString isEqualToString:STUDYTASKSTATE_USED])?YES:NO;
self.uploadReceiptsButton.hidden = ![BaseViewController isBlankString:model.orderReceiptUrl]?YES:NO;
self.rejectNoteLabel.hidden = [self.stateString isEqualToString:STUDYTASKSTATE_REFUSE]?NO:YES;
NSString *noteString = [model.draws.firstObject remark];
self.rejectNoteLabel.text = [NSString stringWithFormat:@"拒绝原因:%@",noteString];
......
# frozen_string_literal: true
source "https://rubygems.org"
gem 'fastlane'
gem 'cocoapods'
plugins_path = File.join(File.dirname(__FILE__), 'fastlane', 'Pluginfile')
eval_gemfile(plugins_path) if File.exist?(plugins_path)
# gem "rails"
GEM
remote: https://rubygems.org/
specs:
CFPropertyList (2.3.5)
activesupport (4.2.8)
i18n (~> 0.7)
minitest (~> 5.1)
thread_safe (~> 0.3, >= 0.3.4)
tzinfo (~> 1.1)
claide (1.0.2)
cocoapods (1.2.1)
activesupport (>= 4.0.2, < 5)
claide (>= 1.0.1, < 2.0)
cocoapods-core (= 1.2.1)
cocoapods-deintegrate (>= 1.0.1, < 2.0)
cocoapods-downloader (>= 1.1.3, < 2.0)
cocoapods-plugins (>= 1.0.0, < 2.0)
cocoapods-search (>= 1.0.0, < 2.0)
cocoapods-stats (>= 1.0.0, < 2.0)
cocoapods-trunk (>= 1.2.0, < 2.0)
cocoapods-try (>= 1.1.0, < 2.0)
colored2 (~> 3.1)
escape (~> 0.0.4)
fourflusher (~> 2.0.1)
gh_inspector (~> 1.0)
molinillo (~> 0.5.7)
nap (~> 1.0)
ruby-macho (~> 1.1)
xcodeproj (>= 1.4.4, < 2.0)
cocoapods-core (1.2.1)
activesupport (>= 4.0.2, < 5)
fuzzy_match (~> 2.0.4)
nap (~> 1.0)
cocoapods-deintegrate (1.0.1)
cocoapods-downloader (1.1.3)
cocoapods-plugins (1.0.0)
nap
cocoapods-search (1.0.0)
cocoapods-stats (1.0.0)
cocoapods-trunk (1.2.0)
nap (>= 0.8, < 2.0)
netrc (= 0.7.8)
cocoapods-try (1.1.0)
colored2 (3.1.2)
escape (0.0.4)
fourflusher (2.0.1)
fuzzy_match (2.0.4)
gh_inspector (1.0.3)
i18n (0.8.4)
minitest (5.10.2)
molinillo (0.5.7)
nanaimo (0.2.3)
nap (1.1.0)
netrc (0.7.8)
ruby-macho (1.1.0)
thread_safe (0.3.6)
tzinfo (1.2.3)
thread_safe (~> 0.1)
xcodeproj (1.5.0)
CFPropertyList (~> 2.3.3)
claide (>= 1.0.2, < 2.0)
colored2 (~> 3.1)
nanaimo (~> 0.2.3)
PLATFORMS
ruby
DEPENDENCIES
cocoapods
BUNDLED WITH
1.15.1
......@@ -3071,7 +3071,7 @@
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n";
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n";
showEnvVarsInLog = 0;
};
8AEDD7EAF52D1A8E3D9471B8 /* [CP] Embed Pods Frameworks */ = {
......@@ -3511,8 +3511,9 @@
CODE_SIGN_IDENTITY = "iPhone Developer";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
COMPRESS_PNG_FILES = NO;
CURRENT_PROJECT_VERSION = 5;
DEFINES_MODULE = YES;
DEVELOPMENT_TEAM = W54V2VB863;
DEVELOPMENT_TEAM = "";
ENABLE_BITCODE = NO;
FRAMEWORK_SEARCH_PATHS = "$(inherited)";
GCC_INPUT_FILETYPE = automatic;
......@@ -3590,6 +3591,7 @@
SWIFT_VERSION = 3.0;
TARGETED_DEVICE_FAMILY = 2;
USER_HEADER_SEARCH_PATHS = "$(PODS_ROOT)/**";
VERSIONING_SYSTEM = "apple-generic";
};
name = Debug;
};
......@@ -3604,8 +3606,9 @@
CODE_SIGN_IDENTITY = "iPhone Developer";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
COMPRESS_PNG_FILES = NO;
CURRENT_PROJECT_VERSION = 5;
DEFINES_MODULE = YES;
DEVELOPMENT_TEAM = W54V2VB863;
DEVELOPMENT_TEAM = "";
ENABLE_BITCODE = NO;
FRAMEWORK_SEARCH_PATHS = "$(inherited)";
GCC_INPUT_FILETYPE = automatic;
......@@ -3683,6 +3686,7 @@
SWIFT_VERSION = 3.0;
TARGETED_DEVICE_FAMILY = 2;
USER_HEADER_SEARCH_PATHS = "$(PODS_ROOT)/**";
VERSIONING_SYSTEM = "apple-generic";
};
name = Release;
};
......
......@@ -15,7 +15,7 @@
<key>CFBundleName</key>
<string>欧立方</string>
<key>CFBundleShortVersionString</key>
<string>2.1.6</string>
<string>2.1.12</string>
<key>CFBundleURLTypes</key>
<array>
<dict>
......@@ -48,7 +48,7 @@
</dict>
</array>
<key>CFBundleVersion</key>
<string>2.1.6</string>
<string>5</string>
<key>LSApplicationQueriesSchemes</key>
<array>
<string>wechat</string>
......
#配置以下项
# 工程名
APP_NAME="Lighting"
# 电脑用户名
USER_NAME="caoyunxiao"
# 证书
CODE_SIGN_DISTRIBUTION="iPhone Distribution: Shanghai Gomore Information Technology Co.,Ltd"
#描述文件名称
Profile_Name="oppleDis"
# info.plist路径
project_infoplist_path="./${APP_NAME}/Info.plist"
#取版本号
bundleShortVersion=$(/usr/libexec/PlistBuddy -c "print CFBundleShortVersionString" "${project_infoplist_path}")
#取build值
bundleVersion=$(/usr/libexec/PlistBuddy -c "print CFBundleVersion" "${project_infoplist_path}")
#日期
DATE="$(date +%Y%m%d %H:%M:%S)"
#ipa文件名字
IPANAME="${APP_NAME}_V${bundleShortVersion}_${DATE}"
#xcarchive路径
archivePath="/Users/${USER_NAME}/Desktop/App_IOS/archive/${APP_NAME}.xcarchive"
#IPA路径
ipa_path="/Users/${USER_NAME}/Desktop/App_IOS/archive/${IPANAME}"
#要上传的ipa文件路径
echo ${ipa_path}".ipa"> text.txt
echo "=================clean================="
xcodebuild -workspace "${APP_NAME}.xcworkspace" -scheme "${APP_NAME}" -configuration 'Release' clean
echo "+++++++++++++++++build+++++++++++++++++"
xcodebuild -workspace "${APP_NAME}.xcworkspace" -scheme "${APP_NAME}" -sdk iphoneos -configuration 'Release' CODE_SIGN_IDENTITY="${CODE_SIGN_DISTRIBUTION}" SYMROOT='$(PWD)'
#打包
xcodebuild -archivePath ${archivePath} -workspace "${APP_NAME}.xcworkspace" -sdk iphoneos -scheme "${APP_NAME}" -configuration "Release" archive
#生成IPA
xcodebuild -exportArchive -archivePath ${archivePath} -exportPath ${ipa_path} -exportProvisioningProfile "${Profile_Name}"
......@@ -117,4 +117,4 @@ SPEC CHECKSUMS:
PODFILE CHECKSUM: 91aa6880ad838660fc2adc77a00cb4d4cbd40356
COCOAPODS: 1.2.0
COCOAPODS: 1.2.1
......@@ -117,4 +117,4 @@ SPEC CHECKSUMS:
PODFILE CHECKSUM: 91aa6880ad838660fc2adc77a00cb4d4cbd40356
COCOAPODS: 1.2.0
COCOAPODS: 1.2.1
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -21,6 +21,9 @@ case "${TARGETED_DEVICE_FAMILY}" in
3)
TARGET_DEVICE_ARGS="--target-device tv"
;;
4)
TARGET_DEVICE_ARGS="--target-device watch"
;;
*)
TARGET_DEVICE_ARGS="--target-device mac"
;;
......
......@@ -6,4 +6,5 @@ OTHER_CFLAGS = $(inherited) -isystem "${PODS_ROOT}/Headers/Public" -isystem "${P
OTHER_LDFLAGS = $(inherited) -ObjC -l"AFNetworking" -l"AliyunOSSiOS" -l"DACircularProgress" -l"DZNEmptyDataSet" -l"FDFullscreenPopGesture" -l"IQKeyboardManager" -l"JSONModel" -l"MBProgressHUD" -l"MJRefresh" -l"MMDrawerController" -l"MWPhotoBrowser" -l"Masonry" -l"PNChart" -l"SDWebImage" -l"SocialSina" -l"SocialWeChat" -l"UICountingLabel" -l"UITableView+FDTemplateLayoutCell" -l"UMSocialLog" -l"WYPopoverController" -l"WZLBadge" -l"YXAlertController" -l"c++" -l"iCarousel" -l"jcore-ios-1.1.1" -l"jpush-ios-3.0.2" -l"resolv" -l"sqlite3" -l"z" -framework "AssetsLibrary" -framework "Bugly" -framework "CFNetwork" -framework "CoreFoundation" -framework "CoreGraphics" -framework "CoreTelephony" -framework "Foundation" -framework "ImageIO" -framework "MediaPlayer" -framework "MobileCoreServices" -framework "QuartzCore" -framework "Security" -framework "SystemConfiguration" -framework "UIKit" -framework "UMMobClick" -framework "UMSocialCore" -framework "UMSocialNetwork" -weak_framework "Photos" -weak_framework "UserNotifications"
PODS_BUILD_DIR = $BUILD_DIR
PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
PODS_PODFILE_DIR_PATH = ${SRCROOT}/.
PODS_ROOT = ${SRCROOT}/Pods
......@@ -6,4 +6,5 @@ OTHER_CFLAGS = $(inherited) -isystem "${PODS_ROOT}/Headers/Public" -isystem "${P
OTHER_LDFLAGS = $(inherited) -ObjC -l"AFNetworking" -l"AliyunOSSiOS" -l"DACircularProgress" -l"DZNEmptyDataSet" -l"FDFullscreenPopGesture" -l"IQKeyboardManager" -l"JSONModel" -l"MBProgressHUD" -l"MJRefresh" -l"MMDrawerController" -l"MWPhotoBrowser" -l"Masonry" -l"PNChart" -l"SDWebImage" -l"SocialSina" -l"SocialWeChat" -l"UICountingLabel" -l"UITableView+FDTemplateLayoutCell" -l"UMSocialLog" -l"WYPopoverController" -l"WZLBadge" -l"YXAlertController" -l"c++" -l"iCarousel" -l"jcore-ios-1.1.1" -l"jpush-ios-3.0.2" -l"resolv" -l"sqlite3" -l"z" -framework "AssetsLibrary" -framework "Bugly" -framework "CFNetwork" -framework "CoreFoundation" -framework "CoreGraphics" -framework "CoreTelephony" -framework "Foundation" -framework "ImageIO" -framework "MediaPlayer" -framework "MobileCoreServices" -framework "QuartzCore" -framework "Security" -framework "SystemConfiguration" -framework "UIKit" -framework "UMMobClick" -framework "UMSocialCore" -framework "UMSocialNetwork" -weak_framework "Photos" -weak_framework "UserNotifications"
PODS_BUILD_DIR = $BUILD_DIR
PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
PODS_PODFILE_DIR_PATH = ${SRCROOT}/.
PODS_ROOT = ${SRCROOT}/Pods
......@@ -97,24 +97,24 @@ typedef NS_ENUM(NSInteger,COMMENT_PRAISE) {
/**
* 服务器开发地址
*/
#define SERVERREQUESTURL(URL) [NSString stringWithFormat:@"http://gomoredev:8082/opple-web/app%@",URL]
//#define SERVERREQUESTURL(URL) [NSString stringWithFormat:@"http://gomoredev:8082/opple-web/app%@",URL]
//外网http://debenson.picp.io/opple-web/
/**
* 局域网开发地址
*/
//#define SERVERREQUESTURL(URL) [NSString stringWithFormat:@"http://192.168.199.198:8080/opple-web/app%@",URL]
//#define SERVERREQUESTURL(URL) [NSString stringWithFormat:@"http://192.168.199.198/opple-web/app%@",URL]
/**
* 服务器测试地址
*/
//#define SERVERREQUESTURL(URL) [NSString stringWithFormat:@"http://dg-dev.opple.com/opple-web/app%@",URL]
#define SERVERREQUESTURL(URL) [NSString stringWithFormat:@"http://dg-dev.opple.com/opple-web/app%@",URL]
//**
// * 服务器正式地址
// */
//#define SERVERREQUESTURL(URL) [NSString stringWithFormat:@"http://dg.opple.com/opple-web/app%@",URL]
//
/*****************************************接口地址*****************************************/
......
#蒲公英上的User Key
uKey="02794c3c6f78cbfda696f807d4cb1da0"
#蒲公英上的API Key
apiKey="1c1acff227f9dea3eafd531ba369680d"
#要上传的ipa文件路径
IPA_PATH=$(cat text.txt)
#执行上传至蒲公英的命令
echo "++++++++++++++upload+++++++++++++"
curl -F "file=@${IPA_PATH}" -F "uKey=${uKey}" -F "_api_key=${apiKey}" http://www.pgyer.com/apiv1/app/upload
rm -rf text.txt
app_identifier "com.gomore.opple" # The bundle identifier of your app
apple_id "1105938518@qq.com" # Your Apple email address
team_id "W54V2VB863" # Developer Portal Team ID
# you can even provide different app identifiers, Apple IDs and team names per lane:
# More information: https://github.com/fastlane/fastlane/blob/master/fastlane/docs/Appfile.md
# Customise this file, documentation can be found here:
# https://github.com/fastlane/fastlane/tree/master/fastlane/docs
# All available actions: https://docs.fastlane.tools/actions
# can also be listed using the `fastlane actions` command
# Change the syntax highlighting to Ruby
# All lines starting with a # are ignored when running `fastlane`
# If you want to automatically update fastlane if a new version is available:
# update_fastlane
# This is the minimum version number required.
# Update this, if you use features of a newer version
fastlane_version "2.37.0"
default_platform :ios
platform :ios do
before_all do
# ENV["SLACK_URL"] = "https://hooks.slack.com/services/..."
cocoapods
end
desc "Runs all the tests"
lane :test do
scan
end
desc "Submit a new Beta Build to Apple TestFlight"
desc "This will also make sure the profile is up to date"
lane :beta do
# match(type: "appstore") # more information: https://codesigning.guide
gym # Build your app - more options available
pilot
# sh "your_script.sh"
# You can also use other beta testing services here (run `fastlane actions`)
end
desc "企业版"
lane :inHouse do
gym(
workspace: "Lighting.xcworkspace",
scheme: "Lighting",
clean: true,
output_directory: "/Users/caoyunxiao/Desktop/iPA”,
export_method: "enterprise",
output_name: "Lighting.ipa"
)
pgyer(api_key: "f9aefb343ecc7959f8e216ed08db1c83", user_key: "a6283ec42bbaf9efc5b6f01a750299f3")
end
desc "Deploy a new version to the App Store"
lane :release do
# match(type: "appstore")
# snapshot
gym # Build your app - more options available
deliver(force: true)
# frameit
end
# You can define as many lanes as you want
after_all do |lane|
# This block is called, only if the executed lane was successful
# slack(
# message: "Successfully deployed new App Update."
# )
end
error do |lane, exception|
# slack(
# message: exception.message,
# success: false
# )
end
end
# More information about multiple platforms in fastlane: https://github.com/fastlane/fastlane/blob/master/fastlane/docs/Platforms.md
# All available actions: https://docs.fastlane.tools/actions
# fastlane reports which actions are used. No personal data is recorded.
# Learn more at https://github.com/fastlane/fastlane#metrics
# Autogenerated by fastlane
#
# Ensure this file is checked in to source control!
gem 'fastlane-plugin-pgyer'
fastlane documentation
================
# Installation
Make sure you have the latest version of the Xcode command line tools installed:
```
xcode-select --install
```
## Choose your installation method:
<table width="100%" >
<tr>
<th width="33%"><a href="http://brew.sh">Homebrew</a></td>
<th width="33%">Installer Script</td>
<th width="33%">Rubygems</td>
</tr>
<tr>
<td width="33%" align="center">macOS</td>
<td width="33%" align="center">macOS</td>
<td width="33%" align="center">macOS or Linux with Ruby 2.0.0 or above</td>
</tr>
<tr>
<td width="33%"><code>brew cask install fastlane</code></td>
<td width="33%"><a href="https://download.fastlane.tools">Download the zip file</a>. Then double click on the <code>install</code> script (or run it in a terminal window).</td>
<td width="33%"><code>sudo gem install fastlane -NV</code></td>
</tr>
</table>
# Available Actions
## iOS
### ios test
```
fastlane ios test
```
Runs all the tests
### ios beta
```
fastlane ios beta
```
Submit a new Beta Build to Apple TestFlight
This will also make sure the profile is up to date
### ios inHouse
```
fastlane ios inHouse
```
企业版
### ios release
```
fastlane ios release
```
Deploy a new version to the App Store
----
This README.md is auto-generated and will be re-generated every time [fastlane](https://fastlane.tools) is run.
More information about fastlane can be found on [fastlane.tools](https://fastlane.tools).
The documentation of fastlane can be found on [docs.fastlane.tools](https://docs.fastlane.tools).
<?xml version="1.0" encoding="UTF-8"?>
<testsuites>
<testsuite name="fastlane.lanes">
<testcase classname="fastlane.lanes" name="0: Verifying required fastlane version" time="0.002849">
</testcase>
<testcase classname="fastlane.lanes" name="1: default_platform" time="0.003048">
</testcase>
<testcase classname="fastlane.lanes" name="2: cocoapods" time="6.489391">
</testcase>
<testcase classname="fastlane.lanes" name="3: gym" time="123.738273">
</testcase>
<testcase classname="fastlane.lanes" name="4: pgyer" time="84.944522">
</testcase>
</testsuite>
</testsuites>
/Users/caoyunxiao/Desktop/App_IOS/archive/Lighting_VFile Doesn't Exist, Will Create: ./Lighting/Info.plist_.ipa
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment