Skip to content

Commit

Permalink
Merge pull request #23 from IBM/creds
Browse files Browse the repository at this point in the history
Semantic and change order of files for adding creds
  • Loading branch information
ehdsouza authored Sep 19, 2019
2 parents cff60bb + bf4a377 commit 7cfc1cc
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 6 deletions.
4 changes: 3 additions & 1 deletion .releaserc
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
{
"branch": "master",
"verifyConditions": [],
"verifyConditions": ["@semantic-release/changelog", "@semantic-release/git", "@semantic-release/exec"],
"prepare": [
"@semantic-release/changelog",
"@semantic-release/git",
{
"path": "@semantic-release/exec",
"cmd": "bumpversion --current-version ${lastRelease.version} --new-version ${nextRelease.version} patch"
Expand Down
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ install:
- pip install --user bumpversion
- npm install @semantic-release/exec
- npm install @semantic-release/git
- npm install @semantic-release/changelog
notifications:
email: false
script:
Expand Down
10 changes: 5 additions & 5 deletions core/config_utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,18 +73,18 @@ func getServicePropertiesFromCredentialFile(credentialKey string) map[string]str
credentialFilePath = envPath
}

// 2) <user-home-dir>/ibm-credentials.env
// 2) <current-working-directory>/ibm-credentials.env
if credentialFilePath == "" {
var filePath = path.Join(UserHomeDir(), DEFAULT_CREDENTIAL_FILE_NAME)
dir, _ := os.Getwd()
var filePath = path.Join(dir, DEFAULT_CREDENTIAL_FILE_NAME)
if _, err := os.Stat(filePath); err == nil {
credentialFilePath = filePath
}
}

// 3) <current-working-directory>/ibm-credentials.env
// 3) <user-home-dir>/ibm-credentials.env
if credentialFilePath == "" {
dir, _ := os.Getwd()
var filePath = path.Join(dir, DEFAULT_CREDENTIAL_FILE_NAME)
var filePath = path.Join(UserHomeDir(), DEFAULT_CREDENTIAL_FILE_NAME)
if _, err := os.Stat(filePath); err == nil {
credentialFilePath = filePath
}
Expand Down

0 comments on commit 7cfc1cc

Please sign in to comment.