Skip to content

Instantly share code, notes, and snippets.

@nunogoncalves
Last active April 10, 2018 22:22
Show Gist options
  • Save nunogoncalves/5f86fe5a1ef3388c997bdb51da237bc1 to your computer and use it in GitHub Desktop.
Save nunogoncalves/5f86fe5a1ef3388c997bdb51da237bc1 to your computer and use it in GitHub Desktop.
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