Created
March 21, 2016 09:30
-
-
Save ulhas/d5a94ae107dd1e0282a0 to your computer and use it in GitHub Desktop.
Fastlane - private lane for 'deploying framework'
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
desc "Deploy/upload framework" | |
private_lane :deploy_framework do |lane| | |
if !lane[:framework] | |
raise "No framework specified!".red | |
end | |
if !lane[:version] | |
raise "No version specified!".red | |
end | |
framework = lane[:framework] | |
version = lane[:version] | |
file = "build/#{version}.zip" | |
folder_name = "#{framework}" | |
if lane[:production] != true | |
folder_name = "#{framework}-Staging" | |
end | |
upload_to_s3( | |
region: "us-west-2", | |
bucket: ENV['S3_BUCKET'], | |
access_key: ENV['S3_ACCESS_KEY'], | |
secret_access_key: ENV['S3_SECRET_ACCESS_KEY'], | |
acl: "public-read", | |
key: "#{folder_name}/#{version}.zip", | |
file: file | |
) | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment