Commit 66b5ca61 authored by lmj_521aiau@163.com's avatar lmj_521aiau@163.com

no message

parent f21f0fe5
No preview for this file type
......@@ -1860,7 +1860,7 @@
CODE_SIGN_ENTITLEMENTS = ZhiJi/ZhiJi.entitlements;
CODE_SIGN_IDENTITY = "iPhone Developer";
CODE_SIGN_STYLE = Manual;
CURRENT_PROJECT_VERSION = 100;
CURRENT_PROJECT_VERSION = 20200809.10;
DEVELOPMENT_TEAM = 6244YAV33V;
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
......@@ -1870,7 +1870,7 @@
GCC_NO_COMMON_BLOCKS = NO;
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = "$(SRCROOT)/ZhiJi/Classes/Tools/PCH/PrefixHeader.pch";
INFOPLIST_FILE = "$(SRCROOT)/ZhiJi/Info.plist";
INFOPLIST_FILE = ZhiJi/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
......@@ -1946,6 +1946,7 @@
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = 1;
VERSIONING_SYSTEM = "apple-generic";
};
name = Debug;
};
......@@ -1958,7 +1959,7 @@
CODE_SIGN_ENTITLEMENTS = ZhiJi/ZhiJi.entitlements;
CODE_SIGN_IDENTITY = "iPhone Distribution";
CODE_SIGN_STYLE = Manual;
CURRENT_PROJECT_VERSION = 100;
CURRENT_PROJECT_VERSION = 20200809.10;
DEBUG_INFORMATION_FORMAT = dwarf;
DEFINES_MODULE = YES;
DEVELOPMENT_TEAM = 6244YAV33V;
......@@ -1970,7 +1971,7 @@
GCC_NO_COMMON_BLOCKS = NO;
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = "$(SRCROOT)/ZhiJi/Classes/Tools/PCH/PrefixHeader.pch";
INFOPLIST_FILE = "$(SRCROOT)/ZhiJi/Info.plist";
INFOPLIST_FILE = ZhiJi/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
......@@ -2045,6 +2046,7 @@
SWIFT_OBJC_INTERFACE_HEADER_NAME = "ZhiJi-Swift.h";
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = 1;
VERSIONING_SYSTEM = "apple-generic";
};
name = Release;
};
......
......@@ -48,7 +48,7 @@
</dict>
</array>
<key>CFBundleVersion</key>
<string>$(CURRENT_PROJECT_VERSION)</string>
<string>20200809.10</string>
<key>FacebookAppID</key>
<string>288538338896732</string>
<key>FacebookDisplayName</key>
......
......@@ -15,15 +15,99 @@
default_platform(:ios)
def updateProjectBuildNumber
currentTime = Time.new.strftime("%Y%m%d")
build = get_build_number()
if build.include?"#{currentTime}."
# => 为当天版本 计算迭代版本号
lastStr = build[build.length-2..build.length-1]
lastNum = lastStr.to_i
lastNum = lastNum + 1
lastStr = lastNum.to_s
if lastNum < 10
lastStr = lastStr.insert(0,"0")
end
build = "#{currentTime}.#{lastStr}"
else
# => 非当天版本 build 号重置
build = "#{currentTime}.01"
end
puts("*************| 更新build #{build} |*************")
# => 更改项目 build 号
increment_build_number(
build_number: "#{build}"
)
end
#指定项目的scheme名称
scheme="Caring Map"
#蒲公英api_key和user_key
api_key="f59e2e71c25ff32a04890dba176ccc9a"
user_key="365b69831520f9a2177bb2723398d933"
platform :ios do
lane :beta do
build_app(export_method: "ad-hoc")
pgyer(api_key: "f59e2e71c25ff32a04890dba176ccc9a", user_key: "365b69831520f9a2177bb2723398d933")
lane :debug do|options|
branch = options[:branch]
puts "开始打包"
updateProjectBuildNumber #更改项目build号
# 开始打包
gym(
#输出的ipa名称
output_name:"#{scheme}_#{get_build_number()}",
# 是否清空以前的编译信息 true:是
clean:true,
# 指定打包方式,Release 或者 Debug
configuration:"Debug",
# 指定打包所使用的输出方式,目前支持app-store, package, ad-hoc, enterprise, development
export_method:"development",
# 指定输出文件夹
output_directory:"./fastlane/build",
)
puts "开始上传蒲公英"
# 开始上传蒲公英
pgyer(api_key: "#{api_key}", user_key: "#{user_key}")
end
#desc "Push a new release build to the App Store"
lane :release do|options|
branch = options[:branch]
puts "开始打包"
updateProjectBuildNumber #更改项目build号
# 开始打包
gym(
#输出的ipa名称
output_name:"#{scheme}_#{get_build_number()}",
# 是否清空以前的编译信息 true:是
clean:true,
# 指定打包方式,Release 或者 Debug
configuration:"Release",
# 指定打包所使用的输出方式,目前支持app-store, package, ad-hoc, enterprise, development
export_method:"ad-hoc",
# 指定输出文件夹
output_directory:"./fastlane/build",
)
puts "开始上传蒲公英"
# 开始上传蒲公英
pgyer(api_key: "#{api_key}", user_key: "#{user_key}")
end
end
# lane :beta do
# build_app(export_method: "ad-hoc")
# pgyer(api_key: "#{api_key}", user_key: "#{user_key}")
# end
# desc "Push a new release build to the App Store"
# lane :release do
# increment_build_number(xcodeproj: "ZhiJi.xcodeproj")
# build_app(workspace: "ZhiJi.xcworkspace", scheme: "ZhiJi")
# upload_to_app_store
# end
end
......@@ -16,9 +16,14 @@ or alternatively using `brew install fastlane`
# Available Actions
## iOS
### ios beta
### ios debug
```
fastlane ios beta
fastlane ios debug
```
### ios release
```
fastlane ios release
```
......
......@@ -5,17 +5,32 @@
<testcase classname="fastlane.lanes" name="0: default_platform" time="0.000429">
<testcase classname="fastlane.lanes" name="0: default_platform" time="0.000369">
</testcase>
<testcase classname="fastlane.lanes" name="1: build_app" time="837.479766">
<testcase classname="fastlane.lanes" name="1: get_build_number" time="0.528323">
</testcase>
<testcase classname="fastlane.lanes" name="2: pgyer" time="11.149557">
<testcase classname="fastlane.lanes" name="2: increment_build_number" time="1.28951">
</testcase>
<testcase classname="fastlane.lanes" name="3: get_build_number" time="0.774777">
</testcase>
<testcase classname="fastlane.lanes" name="4: gym" time="806.406096">
</testcase>
<testcase classname="fastlane.lanes" name="5: pgyer" time="37.81826">
</testcase>
......
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