Skip to content

Commit

Permalink
build(.releaserc.json): replaced updateVersion.sh with Semantic-relea…
Browse files Browse the repository at this point in the history
…se replace plugin
  • Loading branch information
AsifNawaz-cnic committed May 30, 2024
1 parent a5cc168 commit 30d46c5
Show file tree
Hide file tree
Showing 6 changed files with 223 additions and 34 deletions.
5 changes: 5 additions & 0 deletions .devcontainer/configurations/.zshrc
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,10 @@ source $ZSH/oh-my-zsh.sh
DISABLE_AUTO_UPDATE=true
DISABLE_UPDATE_PROMPT=true

# enable terminal commands history
HISTFILE=~/.zsh_history
HISTSIZE=1000
SAVEHIST=1000

# To customize prompt, run `p10k configure` or edit ~/.p10k.zsh.
[[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,6 @@ node_modules

# go binary
rtldev-middleware-go-sdk

## dns control repo
rtldev-middleware-dnscontrol
18 changes: 16 additions & 2 deletions .releaserc.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,23 @@
}
],
[
"@semantic-release/exec",
"semantic-release-replace-plugin",
{
"prepareCmd": "./updateVersion.sh ${nextRelease.version} ${options.branch}"
"replacements": [
{
"files": ["apiclient/apiclient.go"],
"from": "\"\\d+\\.\\d+\\.\\d+\"",
"to": "\"${nextRelease.version}\"",
"countMatches": true
},
{
"files": ["./**/*.go", "go.mod"],
"from": "github.com/centralnicgroup-opensource/rtldev-middleware-go-sdk/v\\d+",
"to": "github.com/centralnicgroup-opensource/rtldev-middleware-go-sdk/v${nextRelease.version.split('.')[0]}",
"ignore": ["./node_modules/**", "./rtldev-middleware-dnscontrol/**"],
"countMatches": true
}
]
}
],
[
Expand Down
219 changes: 199 additions & 20 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,9 @@
],
"devDependencies": {
"@semantic-release/changelog": "^6.0.3",
"@semantic-release/exec": "^6.0.3",
"@semantic-release/git": "^10.0.1",
"semantic-release": "^23.1.1",
"semantic-release-replace-plugin": "github:centralnicgroup-opensource/rtldev-middleware-semantic-release-replace-plugin",
"semantic-release-teams-notify-plugin": "github:centralnicgroup-opensource/rtldev-middleware-semantic-release-notify-plugin"
}
}
11 changes: 0 additions & 11 deletions updateVersion.sh

This file was deleted.

0 comments on commit 30d46c5

Please sign in to comment.