Skip to content

Commit

Permalink
Add release.sh and generating releas notes from git messages
Browse files Browse the repository at this point in the history
  • Loading branch information
bosob committed Oct 6, 2020
1 parent 66cf606 commit 2293d2d
Show file tree
Hide file tree
Showing 5 changed files with 42 additions and 11 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -35,3 +35,6 @@ nbactions*.xml
# Test
.jqwik-database
.attach_pid*

# Release
.release_notes_*.txt
30 changes: 30 additions & 0 deletions .scripts/release.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
#!/bin/sh

if [ -z "$1" ]
then
echo "release version required"
exit 1
fi
if [ -z "$2" ]
then
echo "new development version required"
exit 1
fi
release_version=$1
development_version="$2-SNAPSHOT"

echo "Start release $release_version by adding tag (see Travis CI)"
git tag -a $release_version -m "Release $release_version"
git push origin $release_version

echo "Update development version to $development_version"
mvn org.codehaus.mojo:versions-maven-plugin:2.5:set -DnewVersion=$development_version
mvn org.codehaus.mojo:versions-maven-plugin:2.5:commit
git ls-files --modified | grep 'pom\.xml$' | xargs git add
git commit -m "Update development version to $development_version"

echo "Release notes by git commit message generated (see .release_notes_$release_version.txt"
git log $(git describe --tags --abbrev=0)..HEAD --pretty=format:"%s" -i -E --grep="^\s*(\[FEATURE\]|\[FIX\])]" > .release_notes_"$release_version".txt
#git log $(git describe --tags --abbrev=0)..HEAD --pretty=format:"%s" -i -E --grep="^\s*(\[INTERNAL\]|\[FEATURE\]|\[FIX\]|\[DOC\])*(\[FEATURE\]|\[FIX\])]" > .release_notes_"$release_version".txt

echo "Please commit and push the change with 'git push origin' and update release notes in GitHub!"
10 changes: 0 additions & 10 deletions .scripts/tag_add.sh

This file was deleted.

2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,4 @@ deploy:
on:
tags: true
after_deploy:
- mvn deploy -Dregistry=https://maven.pkg.github.com/Befrish/jqwik-vavr -Dtoken=GITHUB_TOKEN
- mvn deploy -Dregistry=https://maven.pkg.github.com/Befrish/jqwik-vavr -Dtoken=GITHUB_TOKEN -DskipTests=true -Dmaven.javadoc.skip=true -Dchecks.skip=true -B -V
8 changes: 8 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,14 @@
<tag>HEAD</tag>
</scm>

<distributionManagement>
<repository>
<id>github</id>
<name>GitHub Befrish Apache Maven Packages</name>
<url>https://maven.pkg.github.com/Befrish/${project.artifactId}</url>
</repository>
</distributionManagement>

<properties>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
Expand Down

0 comments on commit 2293d2d

Please sign in to comment.