Skip to content

Commit

Permalink
chore: refactor environment variable prefixes to unified naming conve…
Browse files Browse the repository at this point in the history
…ntion

- Change environment prefix for `GITHUB` to `input`
- Change environment prefix for `DRONE` to `drone`

Signed-off-by: Bo-Yi.Wu <appleboy.tw@gmail.com>
  • Loading branch information
appleboy committed Apr 5, 2023
1 parent 36e505a commit 8a44d35
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cmd/cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -82,9 +82,9 @@ func initConfig() {
// Drone CI need to use `DRONE_` prefix
switch viper.GetString("platform") {
case GITHUB:
viper.SetEnvPrefix(GITHUB)
viper.SetEnvPrefix("input")
case DRONE:
viper.SetEnvPrefix(DRONE)
viper.SetEnvPrefix("drone")
}

if err := viper.ReadInConfig(); err != nil {
Expand Down

0 comments on commit 8a44d35

Please sign in to comment.