Hi am using semantic release for versioning in my repo. In my Gitlab when i merge my branch with master my tag increases according to the commit and it works fine. Is there any way for me to get the " next tag version " that will come before the merge. I want to write the next version to a file before merging
Tried using exec but it doesn't seem to be running
i tried using exec but exec isn't running for me (Am quite new to semantic release i must be doing something wrong somewhere)
Could you push me in the right direction :)
My gitlab Ci script:
semantic_release:
stage: Tag
image: node:12.16
variables:
GITLAB_TOKEN: $TOKEN_ACCESS
before_script:
- npm install -g semantic-release/exec
- npm install -g semantic-release @semantic-release/gitlab-config
script:
- semantic-release -e @semantic-release/gitlab-config @semantic-release/exec
only:
- master
This is my package.json:
{
"name": "@semantic-release/npm",
"description": "semantic-release",
"version": "0.0.0-development",
"author": "",
"release": {
"analyzeCommits": "@semantic-release/commit-analyzer",
"generateNotes": "@semantic-release/release-notes-generator",
"publish": "@semantic-release/gitlab",
"success": false,
"fail": false,
"branches": [
"master"
],
"npmPublish": false
},
"plugins": [
"@semantic-release/commit-analyzer",
"@semantic-release/release-notes-generator",
["@semantic-release/exec", {
"prepareCmd": "./my-build-script.sh ${nextRelease.version}"
}]
]
}
1:30pm
[7:55:10 AM] [semantic-release] › ✔ Completed step "analyzeCommits" of plugin "@semantic-release/commit-analyzer"
[7:55:10 AM] [semantic-release] › ℹ The next release version is 0.2.0
[7:55:10 AM] [semantic-release] › ℹ Start step "verifyRelease" of plugin "[Function: verifyRelease]"
[7:55:10 AM] [semantic-release] › ✔ Completed step "verifyRelease" of plugin "[Function: verifyRelease]"
[7:55:10 AM] [semantic-release] › ℹ Start step "generateNotes" of plugin "@semantic-release/release-notes-generator"
[7:55:10 AM] [semantic-release] › ✔ Completed step "generateNotes" of plugin "@semantic-release/release-notes-generator"
[7:55:10 AM] [semantic-release] › ℹ Start step "prepare" of plugin "[Function: prepare]"
[7:55:10 AM] [semantic-release] › ✔ Completed step "prepare" of plugin "[Function: prepare]"
[7:55:12 AM] [semantic-release] › ✔ Created tag v0.2.0
[7:55:12 AM] [semantic-release] › ℹ Start step "publish" of plugin "@semantic-release/gitlab"
[7:55:12 AM] [semantic-release] [@semantic-release/gitlab] › ℹ Verify GitLab authentication
Exec doesnt seem to be running
semantic-release
updates your app version + create a release right ? And you want to know which release will be the next one ? Which language do you use ? – Karol