Skip to content

Instantly share code, notes, and snippets.

@seivan
Forked from ulhas/deploy_framework.rb
Created May 25, 2016 14:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save seivan/ea6f528b54119603aebc51adaed683d4 to your computer and use it in GitHub Desktop.
Save seivan/ea6f528b54119603aebc51adaed683d4 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