Method: SOULs::Github#secret_set
- Defined in:
- lib/souls/cli/github/index.rb
#secret_set ⇒ Object
4 5 6 7 8 9 10 11 12 13 14 15 16 |
# File 'lib/souls/cli/github/index.rb', line 4 def secret_set Dir.chdir(SOULs.get_mother_path.to_s) do file_path = ".env.production" File.open(file_path, "r") do |file| file.each_line do |line| key_and_value = line.match(/([A-Z_]+)="?([^"]*)"?/) next if key_and_value.nil? system("gh secret set #{key_and_value[1]} -b \"#{key_and_value[2].strip}\"") end end end end |