Skip to content

Instantly share code, notes, and snippets.

@sgomezglobant
Created December 21, 2017 15:50
Show Gist options
  • Select an option

  • Save sgomezglobant/9803dc0f15a8d69396656758106f0a51 to your computer and use it in GitHub Desktop.

Select an option

Save sgomezglobant/9803dc0f15a8d69396656758106f0a51 to your computer and use it in GitHub Desktop.
test
before_all do |lane|
sh("rm -rf ../*.xcarchive")
sh("rm -rf ../*.ipa")
sh("rm -rf ../*.zip")
# Make sure our directory is clean, except for changes Fastlane has made
clean_build_artifacts
# Clean the project
clear_derived_data
end
lane :compile do
Dir.chdir("..") do
sh("gulp build-dev")
sh("gulp sass")
sh("ionic cordova build android")
sh("ionic cordova build ios")
end
end
lane :ipa do
build_number_repository = get_build_number_repository
Dir.chdir("../platforms/ios/build") do
build_number_from_plist = get_build_number
version_number = get_version_number(xcodeproj: "TT.xcodeproj", scheme: "Test")
devAppName = "TestIosV" + version_number + "." + build_number_from_plist + "." + "." + build_number_repository + ".ipa"
# Build
gym(
workspace: "TT.xcworkspace",
scheme: "TT",
silent: true,
clean: true,
output_directory: "../../../",
output_name: devAppName,
#codesigning_identity: "",
export_method: "development" #Available options: app-store, ad-hoc, package, enterprise, development, and developer-id. The list of options varies based on the type of archive. Defaults to development.
)
hockey(
api_token: "",
ipa: "../../../" + devAppName,
notes: "Latest Dev Release"
)
end
end
lane :apk do
build_number_repository = get_build_number_repository
Dir.chdir("../platforms/ios/build") do
build_number_from_plist = get_build_number
version_number = get_version_number(xcodeproj: "Test.xcodeproj", scheme: "Test")
devAppName = "TestAndroidV" + version_number + "." + build_number_from_plist + "." + "." + build_number_repository + ".apk"
sh("cp ../../../platforms/android/build/outputs/apk/android-debug.apk ../../../../" + devAppName)
hockey(
api_token: "",
apk: "../../../" + devAppName,
notes: "Latest Dev Release"
)
end
end
lane :release do
sh("fastlane compile && fastlane apk && fastlane ipa")
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment