Skip to content
This repository has been archived by the owner on May 7, 2022. It is now read-only.

Commit

Permalink
update(🚚): fastfile will source xcode project name from package.json
Browse files Browse the repository at this point in the history
  • Loading branch information
osamaqarem committed Aug 20, 2020
1 parent acc4f4a commit d9fbe84
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions template/fastlane/Fastfile
Original file line number Diff line number Diff line change
Expand Up @@ -75,18 +75,20 @@ platform :ios do

desc 'Build the staging release iOS application.'
private_lane :build_staging do
package = load_json(json_path: "./package.json")
gym(
scheme: "STAGING",
workspace: './ios/' + ENV['APP_NAME'] + '.xcworkspace',
workspace: './ios/' + package['name'] + '.xcworkspace',
export_method: 'ad-hoc'
)
end

desc 'Build the production release iOS application.'
private_lane :build_production do
package = load_json(json_path: "./package.json")
gym(
scheme: "PRODUCTION",
workspace: './ios/' + ENV['APP_NAME'] + '.xcworkspace',
workspace: './ios/' + package['name'] + '.xcworkspace',
export_method: 'ad-hoc'
)
end
Expand Down Expand Up @@ -152,10 +154,10 @@ end
desc 'iOS: Increment build number and set the version to package.json version.'
private_lane :inc_ver_ios do
increment_build_number(
xcodeproj: './ios/' + ENV['APP_NAME'] + '.xcodeproj'
xcodeproj: './ios/' + package['name'] + '.xcodeproj'
)
increment_version_number(
xcodeproj: './ios/' + ENV['APP_NAME'] + '.xcodeproj',
xcodeproj: './ios/' + package['name'] + '.xcodeproj',
version_number: package['version']
)
end
Expand Down Expand Up @@ -196,7 +198,7 @@ end
shield_scale: "0.85",
shield_gravity: "South",
shield_geometry: "+0+5%",
glob: "/ios/" + ENV['APP_NAME'] + "/Images.xcassets/AppIcon.appiconset/*.png",
glob: "/ios/" + package['name'] + "/Images.xcassets/AppIcon.appiconset/*.png",
)
end

Expand Down

0 comments on commit d9fbe84

Please sign in to comment.