Skip to content

Commit 3e66c0e

Browse files
committed
Create news entry on sourceforge for releases automatically
1 parent 48d8065 commit 3e66c0e

File tree

2 files changed

+13
-16
lines changed

2 files changed

+13
-16
lines changed

.ci/build.sh

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ function release_build() {
122122
pmd_ci_gh_releases_uploadAsset "$GH_RELEASE" "net.sourceforge.pmd.eclipse.p2updatesite/target/net.sourceforge.pmd.eclipse.p2updatesite-${PMD_CI_MAVEN_PROJECT_VERSION}.zip"
123123

124124
# extract the release notes
125-
RELEASE_NAME="PMD For Eclipse ${PMD_CI_MAVEN_PROJECT_VERSION} ($(date -u +%d-%B-%Y))"
125+
RELEASE_NAME="PMD For Eclipse ${PMD_CI_MAVEN_PROJECT_VERSION}"
126126
BEGIN_LINE=$(grep -n "^## " ReleaseNotes.md|head -1|cut -d ":" -f 1)
127127
END_LINE=$(grep -n "^## " ReleaseNotes.md|head -2|tail -1|cut -d ":" -f 1)
128128
END_LINE=$((END_LINE - 1))
@@ -137,6 +137,10 @@ $(head -$END_LINE ReleaseNotes.md | tail -$((END_LINE - BEGIN_LINE)))
137137

138138
# Upload it to sourceforge
139139
pmd_ci_sourceforge_uploadFile "pmd-eclipse/zipped" "net.sourceforge.pmd.eclipse.p2updatesite/target/net.sourceforge.pmd.eclipse.p2updatesite-${PMD_CI_MAVEN_PROJECT_VERSION}.zip"
140+
141+
# Create sourceforge blog entry
142+
pmd_ci_sourceforge_createDraftBlogPost "$RELEASE_NAME released" "$RELEASE_BODY" "pmd-eclipse-plugin,release"
143+
local sf_blog_url="${RESULT}"
140144
pmd_ci_log_group_end
141145

142146
pmd_ci_log_group_start "Add new release to update site"
@@ -159,6 +163,8 @@ $(head -$END_LINE ReleaseNotes.md | tail -$((END_LINE - BEGIN_LINE)))
159163

160164
# Publish release - this sends out notifications on github
161165
pmd_ci_gh_releases_publishRelease "$GH_RELEASE"
166+
# Publish sourceforge blog entry
167+
pmd_ci_sourceforge_publishBlogPost "${sf_blog_url}"
162168
}
163169

164170

README.md

Lines changed: 6 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,9 @@ The release happens in two phases:
8686
* Update the versions
8787
2. Push the changes and the tag. The [Github Actions build](https://github.com/pmd/pmd-eclipse-plugin/actions) will
8888
then publish the new version on [update site](https://github.com/pmd/pmd-eclipse-plugin-p2-site/) and
89-
[github releases](https://github.com/pmd/pmd-eclipse-plugin/releases)
89+
[github releases](https://github.com/pmd/pmd-eclipse-plugin/releases). It will also upload the update site
90+
to [sourceforge](https://sourceforge.net/projects/pmd/files/pmd-eclipse/zipped/) and create a sourceforge
91+
[blog entry](https://sourceforge.net/p/pmd/news/).
9092

9193

9294
#### Script
@@ -153,20 +155,9 @@ The release happens in two phases:
153155

154156
echo Done.
155157

156-
Also, don't forget to create a [News](https://sourceforge.net/p/pmd/news/) and
157-
verify, that the zipped update site has been uploaded to
158-
[GitHub Releases](https://github.com/pmd/pmd-eclipse-plugin/releases).
159-
160-
You can use the following template:
161-
162-
PMD for Eclipse $VERSION.$BUILDQUALIFIER released
163-
164-
A new PMD for Eclipse plugin version has been released.
165-
It is available via the update site: <https://pmd.github.io/pmd-eclipse-plugin-p2-site/>
166-
167-
* Release Notes: <https://github.com/pmd/pmd-eclipse-plugin/blob/$VERSION.$BUILDQUALIFIER/ReleaseNotes.md>
168-
169-
158+
Verify, that the zipped update site has been uploaded to
159+
[GitHub Releases](https://github.com/pmd/pmd-eclipse-plugin/releases) and [sourceforge](https://pmd.github.io/pmd-eclipse-plugin-p2-site/)
160+
and that a [news blog entry](https://sourceforge.net/p/pmd/news/) has been created on sourceforge.
170161

171162
### Updating the used PMD version
172163
The parent pom contains the property `pmd.version`. This is used inside the plugin module, to resolve the dependencies.

0 commit comments

Comments
 (0)