Skip to content

Commit a87fb91

Browse files
committed
fix: update deprecation version number in semantic-release run
* Semi-automated using `ssf-formula` (v0.2.0) * References: - #175 (comment) - #185 (comment) * Ensure this only runs until `v1.0.0` (done in the script)
1 parent 1e74ed6 commit a87fb91

File tree

2 files changed

+14
-1
lines changed

2 files changed

+14
-1
lines changed

pre-commit_semantic-release.sh

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,3 +28,16 @@ sed -i -e '1,4s/-/=/g' CHANGELOG.rst
2828

2929
# Return back to the main directory
3030
cd ..
31+
32+
33+
###############################################################################
34+
# (C) Update last version before `v1.0.0` with `${nextRelease.version}`
35+
###############################################################################
36+
# Only apply this while the version number is below `v1.0.0`!
37+
V_REPR=v${1}
38+
MAJOR=$(echo ${V_REPR} | cut -c-2)
39+
if [ ${MAJOR} = "v0" ]; then
40+
sed -i -e "s@^\(\s\+\`\).*\(\s<https://github.com/saltstack-formulas/php-formula/releases/tag/\).*\(>\`_\.\)@\1${V_REPR}\2${V_REPR}\3@" docs/README.rst
41+
sed -i -e "s@^\(\s\+# the final release tag before \`v1.0.0\`, which is expected to be \`\).*\(\`.\s\+#\)@\1${V_REPR}\2@" php/deprecated.sls
42+
sed -i -e "s@^\(\s\+# the final release tag before \`v1.0.0\`, which is expected to be \`\).*\(\`.\s\+#\)@\1${V_REPR}\2@" php/ng/deprecated.sls
43+
fi

release.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ module.exports = {
1414
prepareCmd: 'sh ./pre-commit_semantic-release.sh ${nextRelease.version}',
1515
}],
1616
['@semantic-release/git', {
17-
assets: ['*.md', 'docs/*.rst', 'FORMULA'],
17+
assets: ['*.md', 'docs/*.rst', 'FORMULA', 'php/deprecated.sls', 'php/ng/deprecated.sls'],
1818
}],
1919
'@semantic-release/github',
2020
],

0 commit comments

Comments
 (0)