Skip to content

Instantly share code, notes, and snippets.

@ulhas
Created March 21, 2016 09:30
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save ulhas/d5a94ae107dd1e0282a0 to your computer and use it in GitHub Desktop.
Save ulhas/d5a94ae107dd1e0282a0 to your computer and use it in GitHub Desktop.
Fastlane - private lane for 'deploying framework'
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