Skip to content

Instantly share code, notes, and snippets.

@soichisumi
Created May 21, 2018 09:53
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 soichisumi/5ef72d040fec77ea4c040cf0cdc869b8 to your computer and use it in GitHub Desktop.
Save soichisumi/5ef72d040fec77ea4c040cf0cdc869b8 to your computer and use it in GitHub Desktop.
FastFileの実験跡
default_platform(:ios)
platform :ios do
desc "test"
lane :testlane do
sh("ls")
end
desc "gcp file upload"
lane :file_upload do
google_cloud_storage_upload(
project: "upload-test-yoyo",
keyfile: "./example.json",
bucket: "test-fastlane",
content_path: "./upload.txt"
)
end
desc "gcp file upload"
lane :option_test do |options|
path = options[:filename]
sh("echo", "path="+path)
google_cloud_storage_upload(
project: "upload-test-yoyo",
keyfile: "./example.json",
bucket: "test-fastlane",
content_path: path
)
end
lane :file_download do
exists = google_cloud_storage_check_file(
project: "upload-test-yoyo",
keyfile: "./example.json",
bucket: "test-fastlane",
file_name: "upload.txt"
)
sh("echo", "searching file...")
if exists
sh("echo", "file exists.")
google_cloud_storage_download(
project: "upload-test-yoyo",
keyfile: "./example.json",
bucket: "test-fastlane",
file_name: "upload.txt",
output_path: "./downloaded_upload.txt"
)
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment