Skip to content

Commit 8902d8b

Browse files
authored
Merge pull request #187 from myii/chore/standardise-structure
fix: update deprecation version number in `semantic-release` run
2 parents 1e74ed6 + a87fb91 commit 8902d8b

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)