Skip to content

Commit d5cd750

Browse files
author
Racci
committed
chore(cog): Add cog settings
1 parent cc3f479 commit d5cd750

File tree

1 file changed

+36
-0
lines changed

1 file changed

+36
-0
lines changed

cog.toml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
pre_bump_hooks = [
2+
"""
3+
bash -c "if ! ./gradlew build --info; then exit 1; fi"
4+
""",
5+
"echo 'Bumping from v{{latest}} to v{{version}}!'",
6+
]
7+
post_bump_hooks = [
8+
# Update the version in gradle properties and amend last commit
9+
"sed -i 's/version=.*/version=v{{version}}/' ./gradle.properties",
10+
"git add ./gradle.properties",
11+
"git commit --amend -C HEAD",
12+
# Push to github with new tag
13+
"git push --force",
14+
"git push origin v{{version}}",
15+
# Build gradle
16+
"./gradlew clean build -Pversion=\"v{{version}}\"",
17+
# Create changelog and make new release
18+
"bash -c \"cog changelog -a v{{version}} -t default >> ./.templog.md\"",
19+
"gh release create \"v{{version}}\" -F ./.templog.md -t 'ElixirBot release v{{version}}' build/libs/ElixirBot-v{{version}}-all.jar",
20+
"rm ./.templog.md",
21+
# Update tags
22+
"git fetch --tags origin"
23+
]
24+
25+
tag_prefix = "v"
26+
27+
[changelog]
28+
path = "CHANGELOG.md"
29+
template = "remote"
30+
remote = "github.com"
31+
repository = "ElixirBot"
32+
owner = "Da_Racci"
33+
authors = [
34+
{ signature = "Racci", username = "Da_Racci" },
35+
{ signature = "Da_Racci", username = "Da_Racci" }
36+
]

0 commit comments

Comments
 (0)