Skip to content

Commit 7f6f6be

Browse files
committed
Move from Jitpack to BlueColored Repo
1 parent 3832fd4 commit 7f6f6be

File tree

4 files changed

+115
-9
lines changed

4 files changed

+115
-9
lines changed

.github/workflows/deploy.yml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: Deploy to BlueColored Repo
2+
3+
on:
4+
release:
5+
types: [ released ]
6+
7+
# Allows you to run this workflow manually from the Actions tab
8+
workflow_dispatch:
9+
inputs:
10+
TAG_NAME:
11+
description: 'GitHub Tag Name (for comparing with project version)'
12+
required: true
13+
14+
env:
15+
TAG_NAME: ${{ github.event.inputs.TAG_NAME || github.event.release.tag_name }}
16+
17+
jobs:
18+
deploy:
19+
runs-on: ubuntu-latest
20+
steps:
21+
- name: Checkout
22+
uses: actions/checkout@v4
23+
- name: Set up JDK 17
24+
uses: actions/setup-java@v4
25+
with:
26+
java-version: '17'
27+
distribution: 'temurin'
28+
- name: Check tag with project version
29+
run: |
30+
PROJECT_VERSION=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)
31+
# Remove 'v' prefix from tag name
32+
TAG_VERSION=$(sed 's/^v//g' <<< "$TAG_NAME")
33+
if [ "$PROJECT_VERSION" != "$TAG_VERSION" ]; then
34+
echo "Project version ($PROJECT_VERSION) does not match tag ($TAG_VERSION)"
35+
exit 1
36+
fi
37+
- name: Set up credentials
38+
shell: bash
39+
env:
40+
PASSWORD: ${{ secrets.MAVEN_SECRET }}
41+
run: echo "<settings><servers><server><id>bluecolored-releases</id><username>technicjelle</username><password>$PASSWORD</password></server></servers></settings>" > ~/.m2/settings.xml
42+
- name: Deploy
43+
run: mvn clean deploy

.idea/.gitignore

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

README.md

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,18 @@
11
# Java Update Checker
2-
A simple update checker for your Java application.
2+
[![Latest Release](https://repo.bluecolored.de/api/badge/latest/releases/com/technicjelle/UpdateChecker?name=Latest%20Release&prefix=v)](https://repo.bluecolored.de/#/releases/com/technicjelle/UpdateChecker)
33

4-
## Installation
5-
Visit https://jitpack.io/#TechnicJelle/UpdateCheckerJava for details on how to install this library.
4+
A simple update checker for your Java application that checks GitHub releases.
5+
6+
## Install as dependency in Maven/Gradle
7+
Visit https://repo.bluecolored.de/#/releases/com/technicjelle/UpdateChecker
8+
for instructions on how to add this library as a dependency to your project.
9+
10+
You may want to shade the library!
611

712
## Usage
8-
Simply instantiate a new `UpdateChecker` object with your GitHub username, repository name and current version.
13+
Simply instantiate a new `UpdateChecker` object with your GitHub username, repository name
14+
and the current version of your program.
15+
It uses this to compare to the latest GitHub release tag.
916

1017
Then call `.check()` or `.checkAsync()` on the instance to check for updates.
1118

@@ -17,7 +24,10 @@ updateChecker.check();
1724
updateChecker.logUpdateMessage(logger);
1825
```
1926

20-
Full javadoc API reference: [technicjelle.com/UpdateCheckerJava](https://technicjelle.com/UpdateCheckerJava/com/technicjelle/UpdateChecker.html)
27+
Please see the javadoc for the full API reference:
28+
- main (latest commit): https://technicjelle.com/UpdateCheckerJava
29+
- latest release: https://repo.bluecolored.de/javadoc/releases/com/technicjelle/UpdateChecker/latest
30+
- Also has docs for previous releases (v2.5 and up)
2131

2232
If you want to disable the update checker, you can do so
2333
by passing `-Dtechnicjelle.updatechecker.disabled` as a JVM argument.\

pom.xml

Lines changed: 56 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,20 +6,72 @@
66

77
<groupId>com.technicjelle</groupId>
88
<artifactId>UpdateChecker</artifactId>
9-
<version>2.5</version>
9+
<version>2.5.1</version>
1010

1111
<properties>
12-
<maven.compiler.source>11</maven.compiler.source>
13-
<maven.compiler.target>11</maven.compiler.target>
12+
<java.version>11</java.version>
1413
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
1514
</properties>
1615

16+
<distributionManagement>
17+
<repository>
18+
<id>bluecolored-releases</id>
19+
<url>https://repo.bluecolored.de/releases</url>
20+
</repository>
21+
</distributionManagement>
22+
1723
<build>
1824
<plugins>
1925
<plugin>
2026
<groupId>org.apache.maven.plugins</groupId>
27+
<artifactId>maven-compiler-plugin</artifactId>
28+
<version>3.13.0</version>
29+
<configuration>
30+
<release>${java.version}</release>
31+
</configuration>
32+
</plugin>
33+
<plugin>
34+
<artifactId>maven-source-plugin</artifactId>
35+
<version>3.3.1</version>
36+
<executions>
37+
<execution>
38+
<id>attach-sources</id>
39+
<phase>deploy</phase>
40+
<goals>
41+
<goal>jar-no-fork</goal>
42+
</goals>
43+
</execution>
44+
</executions>
45+
</plugin>
46+
<plugin>
2147
<artifactId>maven-javadoc-plugin</artifactId>
2248
<version>3.8.0</version>
49+
<executions>
50+
<execution>
51+
<id>attach-javadocs</id>
52+
<phase>deploy</phase>
53+
<goals>
54+
<goal>jar</goal>
55+
</goals>
56+
</execution>
57+
</executions>
58+
<configuration>
59+
<links>
60+
</links>
61+
</configuration>
62+
</plugin>
63+
<plugin>
64+
<artifactId>maven-deploy-plugin</artifactId>
65+
<version>3.1.2</version>
66+
<executions>
67+
<execution>
68+
<id>deploy</id>
69+
<phase>deploy</phase>
70+
<goals>
71+
<goal>deploy</goal>
72+
</goals>
73+
</execution>
74+
</executions>
2375
</plugin>
2476
</plugins>
2577
</build>
@@ -28,7 +80,7 @@
2880
<dependency>
2981
<groupId>org.jetbrains</groupId>
3082
<artifactId>annotations</artifactId>
31-
<version>23.1.0</version>
83+
<version>24.1.0</version>
3284
<scope>compile</scope>
3385
</dependency>
3486
<dependency>

0 commit comments

Comments
 (0)