Skip to content

Commit

Permalink
Add publish profile, better resource filtering
Browse files Browse the repository at this point in the history
  • Loading branch information
acoburn committed Oct 12, 2023
1 parent 185ffa1 commit 9789f42
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/cd-config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ jobs:
server-username: MAVEN_REPO_USERNAME
server-password: MAVEN_REPO_TOKEN
- name: Publish to Sonatype
run: if [[ $(./mvnw -q help:evaluate -Dexpression=project.version -DforceStdout) == *SNAPSHOT* ]]; then ./mvnw -B -ntp deploy ; fi
run: if [[ $(./mvnw -q help:evaluate -Dexpression=project.version -DforceStdout) == *SNAPSHOT* ]]; then ./mvnw -B -ntp deploy -Ppublish ; fi
env:
MAVEN_REPO_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
MAVEN_REPO_TOKEN: ${{ secrets.SONATYPE_PASSWORD }}
Expand Down
2 changes: 1 addition & 1 deletion buildtools/src/main/resources/docker/publishToDockerHub.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ BRANCH=$(git branch 2>/dev/null | sed -n -e 's/^\* \(.*\)/\1/p')
##################################
IMAGE=trellisldp/trellis-triplestore

./mvnw package -pl apps/quarkus -am
./mvnw package -pl apps/quarkus -am -Ppublish

TAG=latest
# Use the develop tag for snapshots
Expand Down
2 changes: 1 addition & 1 deletion buildtools/src/main/resources/docker/publishToGitHub.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ VERSION=$(./mvnw -q help:evaluate -Dexpression=project.version -DforceStdout)
# Publish releases only
if [[ $VERSION != *SNAPSHOT* ]]; then

./mvnw package -pl apps/quarkus -am
./mvnw package -pl apps/quarkus -am -Ppublish

cd apps/quarkus
##################################
Expand Down
13 changes: 13 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -644,6 +644,19 @@
</plugins>
</reporting>

<profiles>
<profile>
<id>publish</id>
<properties>
<skipTests>true</skipTests>
<pmd.skip>true</pmd.skip>
<cpd.skip>true</cpd.skip>
<jacoco.skip>true</jacoco.skip>
<checkstyle.skip>true</checkstyle.skip>
</properties>
</profile>
</profiles>

<developers>
<developer>
<id>acoburn</id>
Expand Down
7 changes: 7 additions & 0 deletions trellis-app/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,13 @@
</dependencies>

<build>
<resources>
<resource>
<directory>src/main/resources</directory>
<filtering>true</filtering>
</resource>
</resources>

<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,5 @@ tttttt:::::::tttttt rr::::::rrrrr::::::re::::::e e:::::el::::l l::::l i:
tt:::::::::::ttr:::::r ee:::::::::::::e l::::::ll::::::li::::::i s:::::::::::ss
ttttttttttt rrrrrrr eeeeeeeeeeeeee lllllllllllllllliiiiiiii sssssssssss

version: $version
version: ${project.version}

0 comments on commit 9789f42

Please sign in to comment.