Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Ruby script that generates a swift file with credentials
#!/usr/bin/ruby
file_content = <<-CREDS_FILE_STRING
struct GithubCreds {
static let clientId = "#{ENV['GITHUB_CLIENT_ID']}"
static let clientSecret = "#{ENV['GITHUB_CLIENT_SECRET']}"
}
CREDS_FILE_STRING
file = File.new("Path/To/GithubCredentials.swift", "w")
file.puts(file_content)
file.close
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.