Compare commits
No commits in common. "4dc7ec53e3ead1c6425f77ab80e0507f72bd1da9" and "74d7ceea1bd3b9801563134d948f172b015558ab" have entirely different histories.
4dc7ec53e3
...
74d7ceea1b
59
.drone.yml
59
.drone.yml
@ -4,73 +4,26 @@ type: docker
|
||||
name: main
|
||||
|
||||
steps:
|
||||
- name: fetch tags
|
||||
image: alpine/git
|
||||
- name: Tag commit
|
||||
image: alpine
|
||||
commands:
|
||||
- git fetch --tags
|
||||
- name: update version and changelog
|
||||
image: registry.riba-interactive.de/conventi:1
|
||||
- name: commit changelog updates
|
||||
image: alpine/git
|
||||
commands:
|
||||
- git add .
|
||||
- git commit -m "[CI SKIP] version and changelog update"
|
||||
- name: tag commit
|
||||
image: registry.riba-interactive.de/conventi:1
|
||||
commands:
|
||||
- export version=$(conventi.sh get_version)
|
||||
- git tag -am "Tagging new version $version" "$version"
|
||||
- git push origin "$version"
|
||||
- echo This would create a tag
|
||||
|
||||
trigger:
|
||||
branch:
|
||||
- main
|
||||
event:
|
||||
- push
|
||||
---
|
||||
kind: pipeline
|
||||
type: docker
|
||||
name: tag
|
||||
name: develop
|
||||
|
||||
steps:
|
||||
- name: Build release
|
||||
image: registry.riba-interactive.de/alpine-build:1
|
||||
commands:
|
||||
- cmake -S. -Bcmake-build-ci -DCMAKE_BUILD_TYPE=Release
|
||||
- cd cmake-build-ci
|
||||
- cmake --build .
|
||||
- echo "Done"
|
||||
|
||||
trigger:
|
||||
event:
|
||||
- tag
|
||||
---
|
||||
kind: pipeline
|
||||
type: docker
|
||||
name: Build and Test
|
||||
|
||||
steps:
|
||||
- name: Build and run tests
|
||||
image: registry.riba-interactive.de/alpine-build:1
|
||||
commands:
|
||||
- cmake -S. -Bcmake-build-ci -DCMAKE_BUILD_TYPE=Debug -DENABLE_TEST_COVERAGE=on
|
||||
- cd cmake-build-ci
|
||||
- cmake --build .
|
||||
- ctest -T Test -T Coverage
|
||||
|
||||
- name: Report test and coverage
|
||||
- name: Tag commit
|
||||
image: alpine
|
||||
commands:
|
||||
- echo "Do some curl or so"
|
||||
when:
|
||||
event:
|
||||
- pull_request
|
||||
- echo This would build the app and run test
|
||||
|
||||
trigger:
|
||||
branch:
|
||||
- develop
|
||||
- feature/*
|
||||
|
||||
image_pull_secrets:
|
||||
- dockerconfig
|
||||
...
|
||||
@ -1,7 +0,0 @@
|
||||
FROM alpine:3.16.0
|
||||
|
||||
RUN apk --no-cache add \
|
||||
bison \
|
||||
build-base \
|
||||
cmake \
|
||||
flex
|
||||
@ -1,13 +0,0 @@
|
||||
FROM alpine:3.16.0
|
||||
|
||||
RUN apk --no-cache add \
|
||||
git \
|
||||
jq
|
||||
|
||||
COPY conventi.sh /usr/local/bin/
|
||||
|
||||
VOLUME /conventi
|
||||
WORKDIR /conventi
|
||||
|
||||
ENTRYPOINT ["/usr/local/bin/conventi.sh"]
|
||||
CMD [""]
|
||||
@ -199,9 +199,9 @@ get_breaking_change() {
|
||||
format_entry_line() {
|
||||
line=""
|
||||
if [ -n "$2" ]; then
|
||||
line="**$2:** "
|
||||
line="**$2:**"
|
||||
fi
|
||||
line="$line$1"
|
||||
line="$line $1"
|
||||
|
||||
echo "$line ([$3]($(get_config_url)/commit/$3))" | sed -e '2,$s/^[ ]*/ /'
|
||||
}
|
||||
@ -230,39 +230,39 @@ add_changelog_entry_line() {
|
||||
;;
|
||||
|
||||
build)
|
||||
build_lines=$(printf '%s\n* %s\n' "$build_lines" "$2")
|
||||
build_lines="$build_lines\n* $2\n"
|
||||
;;
|
||||
|
||||
chore)
|
||||
chore_lines=$(printf '%s\n* %s\n' "$chore_lines" "$2")
|
||||
chore_lines="$chore_lines\n* $2\n"
|
||||
;;
|
||||
|
||||
ci)
|
||||
ci_lines=$(printf '%s\n* %s\n' "$ci_lines" "$2")
|
||||
ci_lines="$ci_lines\n* $2\n"
|
||||
;;
|
||||
|
||||
doc_lines)
|
||||
doc_lines=$(printf '%s\n* %s\n' "$doc_lines" "$2")
|
||||
doc_lines="$doc_lines\n* $2\n"
|
||||
;;
|
||||
|
||||
style)
|
||||
style_lines=$(printf '%s\n* %s\n' "$style_lines" "$2")
|
||||
style_lines="$style_lines\n* $2\n"
|
||||
;;
|
||||
|
||||
refactor)
|
||||
refactor_lines=$(printf '%s\n* %s\n' "$refactor_lines" "$2")
|
||||
refactor_lines="$refactor_lines\n* $2\n"
|
||||
;;
|
||||
|
||||
perf)
|
||||
perf_lines=$(printf '%s\n* %s\n' "$perf_lines" "$2")
|
||||
perf_lines="$perf_lines\n* $2\n"
|
||||
;;
|
||||
|
||||
test)
|
||||
test_lines=$(printf '%s\n* %s\n' "$test_lines" "$2")
|
||||
test_lines="$test_lines\n* $2\n"
|
||||
;;
|
||||
|
||||
revert)
|
||||
revert_lines=$(printf '%s\n* %s\n' "$revert_lines" "$2")
|
||||
revert_lines="$revert_lines\n* $2\n"
|
||||
;;
|
||||
esac
|
||||
}
|
||||
@ -270,43 +270,44 @@ add_changelog_entry_line() {
|
||||
format_entry() {
|
||||
entry=""
|
||||
if [ -n "$breaking_change_lines" ]; then
|
||||
entry=$(printf '%s\n\n\n### BREAKING CHANGES 🚨\n%s\n' "$entry" "$breaking_change_lines")
|
||||
entry="$entry### BREAKING CHANGES\n$breaking_change_lines\n\n"
|
||||
fi
|
||||
if [ -n "$bugfix_lines" ]; then
|
||||
entry=$(printf '%s\n\n\n### Bug fixes 🩹\n%s\n' "$entry" "$bugfix_lines")
|
||||
entry="$entry### Bug fixes\n$bugfix_lines\n\n"
|
||||
fi
|
||||
if [ -n "$feature_lines" ]; then
|
||||
entry=$(printf '%s\n\n\n### Features 📦\n%s\n' "$entry" "$feature_lines")
|
||||
#entry="$entry### Features\n$feature_lines\n\n"
|
||||
entry=$(printf '%s### Features\n%s\n\n' "$entry" "$feature_lines")
|
||||
fi
|
||||
if [ -n "$revert_lines" ]; then
|
||||
entry=$(printf '%s\n\n\n### Reverts 🔙\n%s\n' "$entry" "$revert_lines")
|
||||
entry="$entry### Reverts\n$revert_lines\n\n"
|
||||
fi
|
||||
if [ -n "$build_lines" ]; then
|
||||
entry=$(printf '%s\n\n\n### Build System 🏗\n%s\n' "$entry" "$build_lines")
|
||||
entry="$entry### Build System\n$build_lines\n\n"
|
||||
fi
|
||||
if [ -n "$chore_lines" ]; then
|
||||
entry=$(printf '%s\n\n\n### Chores 🧽\n%s\n' "$entry" "$chore_lines")
|
||||
entry="$entry### Chores\n$chore_lines\n\n"
|
||||
fi
|
||||
if [ -n "$ci_lines" ]; then
|
||||
entry=$(printf '%s\n\n\n### CIs ⚙️\n%s\n' "$entry" "$ci_lines")
|
||||
entry="$entry### CIs\n$ci_lines\n\n"
|
||||
fi
|
||||
if [ -n "$doc_lines" ]; then
|
||||
entry=$(printf '%s\n\n\n### Docs 📑\n%s\n' "$entry" "$doc_lines")
|
||||
entry="$entry### Docs\n$doc_lines\n\n"
|
||||
fi
|
||||
if [ -n "$test_lines" ]; then
|
||||
entry=$(printf '%s\n\n\n### Tests 🧪\n%s\n' "$entry" "$test_lines")
|
||||
entry="$entry### Tests\n$test_lines\n\n"
|
||||
fi
|
||||
if [ -n "$style_lines" ]; then
|
||||
entry=$(printf '%s\n\n\n### Styles 🖼\n%s\n' "$entry" "$style_lines")
|
||||
entry="$entry### Styles\n$style_lines\n\n"
|
||||
fi
|
||||
if [ -n "$refactor_lines" ]; then
|
||||
entry=$(printf '%s\n\n\n### Refactors 🛠\n%s\n' "$entry" "$refactor_lines")
|
||||
entry="$entry### Refactors\n$refactor_lines\n\n"
|
||||
fi
|
||||
if [ -n "$perf_lines" ]; then
|
||||
entry=$(printf '%s\n\n\n### Performance 🏎\n%s\n' "$entry" "$perf_lines")
|
||||
entry="$entry### Perfs\n$perf_lines\n\n"
|
||||
fi
|
||||
if [ -n "$entry" ]; then
|
||||
entry=$(printf '## [%s](%s/compare/%s...%s) (%s)%s' "$version" "$(get_config_url)" "$from_hash" "$to_hash" "$(date '+%Y-%m-%d')" "$entry")
|
||||
entry="## [$version]($(get_config_url)/compare/$from_hash...$to_hash) ($(date '+%Y-%m-%d'))\n\n\n$entry"
|
||||
fi
|
||||
echo "$entry"
|
||||
}
|
||||
@ -338,17 +339,13 @@ generate_changelog_entry() {
|
||||
line=$(format_entry_line "$description" "$scope" "$hash")
|
||||
|
||||
if [ "$is_breaking" -eq 1 ] && [ -z "$breaking_change" ]; then
|
||||
if [ -n "$body" ]; then
|
||||
breaking_change="$body"
|
||||
else
|
||||
breaking_change="$description"
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ "$is_breaking" -eq 1 ]; then
|
||||
is_major=1
|
||||
breaking_change=$(echo "$breaking_change" | sed -e '2,$s/^[ ]*/ /')
|
||||
breaking_change_lines=$(printf '%s\n* %s\n' "$breaking_change_lines" "$breaking_change")
|
||||
breaking_change_lines="$breaking_change_lines\n* $breaking_change\n"
|
||||
fi
|
||||
|
||||
case "$type" in
|
||||
@ -389,9 +386,9 @@ new_changelog_entry() {
|
||||
|
||||
changelog=$(sed -n '/^----/,//{/^----/!p;}' <$changelog_file)
|
||||
if [ -n "$changelog" ]; then
|
||||
changelog=$(printf '%s\n%s\n%s' "$changelog_header" "$entry" "$changelog")
|
||||
changelog="$changelog_header\n$entry\n$changelog"
|
||||
else
|
||||
changelog=$(printf '%s\n%s' "$changelog_header" "$entry")
|
||||
changelog="$changelog_header\n$entry"
|
||||
fi
|
||||
echo "$changelog" >$changelog_file
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user