Skip to content

Commit

Permalink
JNG-2234 Generation handling is improved
Browse files Browse the repository at this point in the history
  • Loading branch information
robertcsakany committed Jan 14, 2021
1 parent 55ebf49 commit 3821c43
Show file tree
Hide file tree
Showing 4 changed files with 52 additions and 17 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -55,4 +55,6 @@ local.properties
wercker.env
/**/.wercker
**/GSModel.log*
.release


9 changes: 6 additions & 3 deletions .releasetemplate
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
**Branch:** ${env.WERCKER_GIT_BRANCH}
**Maven repository:** ${env.JUDONG_MAVEN_UPSTREAM_SNAPSHOT}/#browse/browse:maven-judo-release:hu%2Fblackbelt%2Feclipse%2F${project-shortname}
**Wercker:** https://app.wercker.com/${project-repositoryId}/runs/build/${env.WERCKER_RUN_ID}
**Branch:**
${env.WERCKER_GIT_BRANCH}
**Maven repository:**
${env.JUDONG_MAVEN_UPSTREAM_SNAPSHOT}/#browse/browse:maven-judo-release:hu%2Fblackbelt%2Feclipse%2F${project-shortname}
**Wercker:**
https://app.wercker.com/${project-repositoryId}/runs/build/${env.WERCKER_RUN_ID}
50 changes: 40 additions & 10 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -199,16 +199,6 @@
</dependencies>
</dependencyManagement>
<build>
<resources>
<resource>
<directory>${project.basedir}</directory>
<filtering>true</filtering>
<includes>
<include>.releasetemplate</include>
</includes>
</resource>
</resources>

<pluginManagement>
<plugins>
<plugin>
Expand Down Expand Up @@ -470,6 +460,46 @@
</distributionManagement>
</profile>

<profile>
<id>generate-github-release-body</id>
<activation>
<property>
<name>github_release</name>
<value>true</value>
</property>
</activation>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<version>3.2.0</version>
<executions>
<execution>
<id>template-github-release-body</id>
<phase>process-resources</phase>
<goals>
<goal>copy-resources</goal>
</goals>
<configuration>
<outputDirectory>${basedir}/.release</outputDirectory>
<resources>
<resource>
<directory>${project.basedir}</directory>
<filtering>true</filtering>
<includes>
<include>.releasetemplate</include>
</includes>
</resource>
</resources>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>

<profile>
<id>release-p2-judong</id>
<build>
Expand Down
8 changes: 4 additions & 4 deletions wercker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,14 +45,14 @@ build:
- wercker/maven:
goals: deploy
settings: .maven.xml
maven_opts: -Dtycho.mode=maven -DdeployOnly
maven_opts: -Dtycho.mode=maven -DdeployOnly -DskipTests=true -Dgithub_release=true
profiles: ${DEPLOY_PROFILES}
cache_repo: true

- script:
name: get github release attributes
code: |-
export GITHUB_RELEASE_BODY=$(cat ./target/classes/.releasetemplate | jq -aRs . | sed 's/"//g')
export GITHUB_RELEASE_BODY=$(cat ./.release/.releasetemplate | jq -aRs . | sed 's/"//g')
export GITHUB_RELEASE_TITLE=$(echo "$VERSION_NUMBER" | jq -aRs . | sed 's/"//g')
echo "Release title: $GITHUB_RELEASE_TITLE"
echo "Release notes: $GITHUB_RELEASE_BODY"
Expand Down Expand Up @@ -156,7 +156,7 @@ release:
- wercker/maven:
goals: deploy
settings: .maven.xml
maven_opts: -Dtycho.mode=maven -DdeployOnly
maven_opts: -Dtycho.mode=maven -DdeployOnly -DskipTests=true -Dgithub_release=true
profiles: ${DEPLOY_PROFILES}
cache_repo: true

Expand Down Expand Up @@ -231,7 +231,7 @@ release:
- script:
name: get github release attributes
code: |-
export GITHUB_RELEASE_BODY=$(cat ./target/classes/.releasetemplate | jq -aRs . | sed 's/"//g')
export GITHUB_RELEASE_BODY=$(cat ./.release/.releasetemplate | jq -aRs . | sed 's/"//g')
export GITHUB_RELEASE_TITLE=$(echo "$VERSION_NUMBER" | jq -aRs . | sed 's/"//g')
echo "Release title: $GITHUB_RELEASE_TITLE"
echo "Release notes: $GITHUB_RELEASE_BODY"
Expand Down

0 comments on commit 3821c43

Please sign in to comment.