Last active
April 10, 2018 22:22
-
-
Save nunogoncalves/5f86fe5a1ef3388c997bdb51da237bc1 to your computer and use it in GitHub Desktop.
Ruby script that generates a swift file with credentials
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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