e-sites / Natrium

A pre-build (Swift) script to alter your Xcode project at pre-build-time per environment, build configuration and target.
https://www.e-sites.nl
MIT License
146 stars 15 forks source link

Environment not generate as String #18

Closed dangthaison91 closed 5 years ago

dangthaison91 commented 5 years ago

I have some environment variables for CI but Natrium not generate them as Swift String.

.env file:

  API_DOMAIN = 'https://api.domain.com'

natrium:

  variables:
  domain:
    Staging: "api.staging.id.vin"
    Production: "#env(API_DOMAIN)"

Natrium.swift:

class Natrium {

    enum Environment: String {
        case staging = "Staging"
        case production = "Production"
    }

    enum Configuration: String {
        case debug = "Debug"
        case release = "Release"
    }

    class Config {
        static let domain: String = https://api.domain.com
    }
}

It should be Swift String with double quote "":

class Natrium {
    class Config {
        static let domain: String = "https://api.domain.com"
    }
}