Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/eternalcodeteam/gitcheck
✔ Git repository version checker
https://github.com/eternalcodeteam/gitcheck
git git-library hacktoberfest java java-library libraries library
Last synced: 3 months ago
JSON representation
✔ Git repository version checker
- Host: GitHub
- URL: https://github.com/eternalcodeteam/gitcheck
- Owner: EternalCodeTeam
- License: mit
- Created: 2023-01-15T18:40:20.000Z (about 2 years ago)
- Default Branch: master
- Last Pushed: 2024-11-05T14:23:39.000Z (4 months ago)
- Last Synced: 2024-11-05T15:31:23.138Z (4 months ago)
- Topics: git, git-library, hacktoberfest, java, java-library, libraries, library
- Language: Java
- Homepage:
- Size: 247 KB
- Stars: 11
- Watchers: 1
- Forks: 2
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- Contributing: .github/CONTRIBUTING.md
- License: LICENSE
- Code of conduct: .github/CODE_OF_CONDUCT.md
- Codeowners: .github/CODEOWNERS
Awesome Lists containing this project
README

# ✔ GitCheck
GitCheck is a Java library that makes it easy to check for updates to a GitHub repository.
It utilizes the GitHub API to retrieve information about the latest release and compares it to the current version of your application.
With GitCheck, you can ensure that your users are always running the latest version of your software.## Features
- Simple and easy-to-use API
- Lightweight and efficient
- Supports Java 9 and above
- Utilizes the GitHub API for retrieving release information## Installation
To use GitCheck in your project, if you are using Gradle, add the following to your `build.gradle` file:
```kotlin
maven { url = uri("https://repo.eternalcode.pl/releases") }
``````kotlin
implementation("com.eternalcode:gitcheck:1.0.0")
```Or, if you are using Maven, add the following to your `pom.xml` file:
```xml
eternalcode-releases
https://repo.eternalcode.pl/releases```
```xml
com.eternalcode
gitcheck
1.0.0```
## API Usage
To use GitCheck, you need to create an instance of the `GitCheck` class.
Create `GitRepository` and `GitTag` objects to specify the repository and the current version of your application.
Then, call the `checkRelease` method to check for updates.```java
public class MyApplication {public static void main(String[] args) {
GitCheck gitCheck = new GitCheck();
GitRepository repository = GitRepository.of("Owner", "Project");GitCheckResult result = gitCheck.checkRelease(repository, GitTag.of("v1.0.0"));
if (!result.isUpToDate()) {
GitRelease release = result.getLatestRelease();
GitTag tag = release.getTag();System.out.println("A new version is available: " + tag.getTag());
System.out.println("See release page: " + release.getPageUrl());
System.out.println("Release date: " + release.getPublishedAt());
}
// ...
}}
```
In this example, `GitCheck` is used to check for updates to the repository `Owner/Project` with the current version `v1.0.0`.
If a new version is available, the details of the release are printed to the console.## Contributing
We welcome contributions to GitCheck!
If you have an idea for a new feature or have found a bug that needs to be fixed, you can [open an issue](https://github.com/EternalCodeTeam/GitCheck/issues/new) or [submit a pull request](https://github.com/EternalCodeTeam/GitCheck/compare) with your changes.
See [CONTRIBUTING.md](.github/CONTRIBUTING.md) for more information.## License
GitCheck is licensed under the MIT License. See the [LICENSE](LICENSE) file for more information.