Skip to content

Commit

Permalink
Move from Jitpack to BlueColored Repo
Browse files Browse the repository at this point in the history
  • Loading branch information
TechnicJelle committed Jul 21, 2024
1 parent 3832fd4 commit 8606dfb
Show file tree
Hide file tree
Showing 4 changed files with 114 additions and 8 deletions.
43 changes: 43 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Deploy to BlueColored Repo

on:
release:
types: [ released ]

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
inputs:
TAG_NAME:
description: 'GitHub Tag Name (for comparing with project version)'
required: true

env:
TAG_NAME: ${{ github.event.inputs.TAG_NAME || github.event.release.tag_name }}

jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'
- name: Check tag with project version
run: |
PROJECT_VERSION=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)
# Remove 'v' prefix from tag name
TAG_VERSION=$(sed 's/^v//g' <<< "$TAG_NAME")
if [ "$PROJECT_VERSION" != "$TAG_VERSION" ]; then
echo "Project version ($PROJECT_VERSION) does not match tag ($TAG_VERSION)"
exit 1
fi
- name: Set up credentials
shell: bash
env:
PASSWORD: ${{ secrets.MAVEN_SECRET }}
run: echo "<settings><servers><server><id>bluecolored-releases</id><username>technicjelle</username><password>$PASSWORD</password></server></servers></settings>" > ~/.m2/settings.xml
- name: Deploy
run: mvn clean deploy
1 change: 1 addition & 0 deletions .idea/.gitignore

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

20 changes: 15 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,18 @@
# Java Update Checker
A simple update checker for your Java application.
[![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)

## Installation
Visit https://jitpack.io/#TechnicJelle/UpdateCheckerJava for details on how to install this library.
A simple update checker for your Java application that checks GitHub releases.

## Install as dependency in Maven/Gradle
Visit https://repo.bluecolored.de/#/releases/com/technicjelle/UpdateChecker
for instructions on how to add this library as a dependency to your project.

You may want to shade the library!

## Usage
Simply instantiate a new `UpdateChecker` object with your GitHub username, repository name and current version.
Simply instantiate a new `UpdateChecker` object with your GitHub username, repository name
and the current version of your program.
It uses this to compare to the latest GitHub release tag.

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

Expand All @@ -17,7 +24,10 @@ updateChecker.check();
updateChecker.logUpdateMessage(logger);
```

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

If you want to disable the update checker, you can do so
by passing `-Dtechnicjelle.updatechecker.disabled` as a JVM argument.\
Expand Down
58 changes: 55 additions & 3 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,69 @@
<version>2.5</version>

<properties>
<maven.compiler.source>11</maven.compiler.source>
<maven.compiler.target>11</maven.compiler.target>
<java.version>11</java.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>

<distributionManagement>
<repository>
<id>bluecolored-releases</id>
<url>https://repo.bluecolored.de/releases</url>
</repository>
</distributionManagement>

<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.13.0</version>
<configuration>
<release>${java.version}</release>
</configuration>
</plugin>
<plugin>
<artifactId>maven-source-plugin</artifactId>
<version>3.3.1</version>
<executions>
<execution>
<id>attach-sources</id>
<phase>deploy</phase>
<goals>
<goal>jar-no-fork</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-javadoc-plugin</artifactId>
<version>3.8.0</version>
<executions>
<execution>
<id>attach-javadocs</id>
<phase>deploy</phase>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
<configuration>
<links>
</links>
</configuration>
</plugin>
<plugin>
<artifactId>maven-deploy-plugin</artifactId>
<version>3.1.2</version>
<executions>
<execution>
<id>deploy</id>
<phase>deploy</phase>
<goals>
<goal>deploy</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
Expand All @@ -28,7 +80,7 @@
<dependency>
<groupId>org.jetbrains</groupId>
<artifactId>annotations</artifactId>
<version>23.1.0</version>
<version>24.1.0</version>
<scope>compile</scope>
</dependency>
<dependency>
Expand Down

0 comments on commit 8606dfb

Please sign in to comment.