Open ghost opened 3 years ago
The grammar of your question is ambiguous, but I think the answer is no
While standard-version is based on semver, I am currently using it on a project that uses calver (unfortunately, it's not an open source project, so I am unable to share links to the repo). Basically, my workaround is as follows:
npm run release -- --skip.bump
. This generates a changelog, commits it and tags the commit.It generally seems to be working, but I'm not so sure about the generated CHANGELOG, as I'm still in the early stages of the project (it is not uncommon to encounter problems generating the entire changelog with standard-version , see @lukaszmn's post concerning this). I need to experiment further. I'll share my findings.
While standard-version is based on semver, I am currently using it on a project that uses calver (unfortunately, it's not an open source project, so I am unable to share links to the repo). Basically, my workaround is as follows:
1. First, bump your files using another tool that supports calver, like [BumpVer](https://gitlab.com/mbarkhau/pycalver). 2. Commit the bumped files 3. Run **standard-version** without bumping: `npm run release -- --skip.bump`. This generates a changelog, commits it and tags the commit.
It generally seems to be working, but I'm not so sure about the generated CHANGELOG, as I'm still in the early stages of the project (it is not uncommon to encounter problems generating the entire changelog with standard-version , see @lukaszmn's post concerning this). I need to experiment further. I'll share my findings.
Yep, I can confirm that this workaround is working perfectly. I am using BumpVer. The generated changelog is okay. Here's my configuration for reference:
# bumpver.toml in project root
[bumpver]
current_version = "2021.12.30"
version_pattern = "YYYY.0M.0D[-TAG]"
commit_message = "bump: ✈️ {old_version} → {new_version}"
commit = true
tag = false
push = false
[bumpver.file_patterns]
"package.json" = [
'"version": "{version}"',
]
"bumpver.toml" = [
'current_version = "{version}"',
]
"src-capacitor/package.json" = [
'"version": "{version}"',
]
"src-capacitor/android/app/build.gradle" = [
'versionName "{version}"',
]
"src/layouts/MainLayout.vue" = [
"{version}",
]
"src/pages/About.vue" = [
"{version}",
]
# this file is in a ./scripts/ directory and is called bump.sh
# whenever I need to create a release, I just run `./scripts/bump.sh` (you could use npm scripts)
#!/usr/bin/env bash
# First, bump version and commit
previous_tag="$(git describe --abbrev=0 --tags "$(git rev-list --tags --skip=0 --max-count=1)")"
bumpver update
# Then, generate Changelog, create Tag, and commit
npm run release -- --skip.bump --releaseCommitMessageFormat "bump: ✈️ $previous_tag → v{{currentTag}}"
https://calver.org/