Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade Gradle wrapper to version 8.6 #520

Merged
merged 12 commits into from
Feb 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ trim_trailing_whitespace = true
end_of_line = crlf
trim_trailing_whitespace = false

[*.{gradle,yml}]
[*.{g,gradle,json,xml,xsd,yml}]
indent_size = 2

[metafacture-io/src/test/resources/org/metafacture/io/compressed.txt]
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
with:
java-version: 1.8
- name: Publish package
run: ./gradlew publish
run: ./gradlew publishAllPublicationsToGitHubPackagesRepository
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ tmp
.classpath
.project
.settings/
bin/

# Ignore IntelliJ project files:
*.ipr
Expand Down
56 changes: 28 additions & 28 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -180,43 +180,43 @@ We use semantic versioning in release numbers `A`.`B`.`C`, i.e. increase `A` whe
The following commands trigger a release build.

1. Create a signed tag:
```
git tag -s metafacture-core-A.B.C
```
```
git tag -s metafacture-core-A.B.C
```
1. When prompted, add a sensible commit message. For instance, something like:
```
Publish first release of the Metafacture A line
```
```
Publish first release of the Metafacture A line
```
1. You can now test the build locally by invoking:
```
./gradlew assemble
```
```
./gradlew assemble
```
1. Finally, push the new tag to GitHub to trigger the actual release build:
```
git push --follow-tags metafacture-core-A.B.C
```
```
git push --follow-tags metafacture-core-A.B.C
```

#### Publish to Maven Central

Upload archives to sonatype (where they can be released to Maven Central)

1. Make sure to have a clean directory (otherwise only a SNAPSHOT will be built):
```
git status
```
```
git status
```
1. You need a `gradle.properties` in the root directory that looks like this:
```
signing.gnupg.executable=gpg
signing.gnupg.useLegacyGpg=true
signing.gnupg.homeDir=$e.g."~/.gnupg"
signing.gnupg.keyName=$yourKeyName
signing.gnupg.passphrase=$keysPassphrase
releaseRepositoryUrl=https://oss.sonatype.org/service/local/staging/deploy/maven2/
releaseRepositoryUser=$yourSonatypeUsername
releaseRepositoryPassword=$yourSonatypePassword
```
```
signing.gnupg.executable=gpg
signing.gnupg.useLegacyGpg=true
signing.gnupg.homeDir=$e.g."~/.gnupg"
signing.gnupg.keyName=$yourKeyName
signing.gnupg.passphrase=$keysPassphrase
releaseRepositoryUrl=https://oss.sonatype.org/service/local/staging/deploy/maven2/
releaseRepositoryUser=$yourSonatypeUsername
releaseRepositoryPassword=$yourSonatypePassword
```
1. Let the release be built, signed and uploaded:
```
./gradlew uploadArchives
```
```
./gradlew publishAllPublicationsToMavenRepository
```
1. Finally, go to oss.sonatype.org , check the `Staging Repositories` when it's finished, and release it by clicking `close`
71 changes: 41 additions & 30 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,23 +17,32 @@ You can either use Metafacture as a stand-alone application or include it as a J
## Metafacture as a stand-alone application

If you are only interested in running Flux scripts without doing any Java programming this is the way to go. The instructions assume that you are using a \*nix-like shell. [See more information in the wiki page about Flux](https://github.com/metafacture/metafacture-core/wiki/Flux-user-guide).
You can `build` the stand-alone application yourself or `download` it.

1. Download the latest distribution package from the [release page](https://github.com/metafacture/metafacture-core/releases). Make sure that you do download a distribution package and *not* a source code package (the file name should include `*-dist*`).

2. Extract the downloaded archive:
```bash
$ tar xzf metafacture-core-$VERSION-dist.tar.gz
```
This will create a new directory containing a ready-to-use Metafacture distribution.
3. Change into the newly created directory:
```bash
$ cd metafacture-core-$VERSION
```
4. Run one of the example scripts:
```bash
$ ./flux.sh examples/read/marc21/read-marc21.flux
```
This example will print a number of MARC 21 records on standard output.
a) Build

Proceed as described in [Building metafacture-core from source](#build_from_source).

b) Download

Download the latest distribution package from the [release page](https://github.com/metafacture/metafacture-core/releases). Make sure that you do download a distribution package and *not* a source code package (the file name should include `*-dist*`).

Regardless if you've built or downloaded, go on with:

1. Extract the archive:
```bash
$ tar xzf metafacture-core-$VERSION-dist.tar.gz
```
This will create a new directory containing a ready-to-use Metafacture distribution.
2. Change into the newly created directory:
```bash
$ cd metafacture-core-$VERSION
```
3. Run one of the example scripts:
```bash
$ ./flux.sh examples/read/marc21/read-marc21.flux
```
This example will print a number of MARC 21 records on standard output.

The `examples` folder contains many more examples which provide a good starting point for learning Metafacture. If you have any questions please join our [mailing list](http://lists.dnb.de/mailman/listinfo/metafacture) or use our issue-based discussion forum over at [metafacture-documentation](https://github.com/metafacture/metafacture-documentation).

Expand Down Expand Up @@ -66,25 +75,27 @@ Occasionally, we publish snapshot builds on [Sonatype OSS Repository](https://os
TODO: Link to getting started tutorial
-->


<a name="build_from_source"></a>
# Building metafacture-core from source

Building metafacture-core from source is easy. All you need is git and JDK 8:

1. Clone the metafacture-core repository and change into the directory:

```bash
$ git clone https://github.com/metafacture/metafacture-core.git
$ cd metafacture-core
```

2. Invoke the Gradle wrapper to download Gradle and build metafacture-core (on Windows call `gradlew.bat install` instead):

```bash
$ ./gradlew install
```

Besides the resulting distribution in `metafacture-core/metafacture-runner/build/distributions/` this also provides builds in your local maven repository.

```bash
$ git clone https://github.com/metafacture/metafacture-core.git
$ cd metafacture-core
```

2. Invoke the Gradle wrapper to download Gradle and build metafacture-core (on Windows call `gradlew.bat publishToMavenLocal` instead) and publish these to your local Maven repository:
```bash
$ ./gradlew publishToMavenLocal
```

3. Create a distribution if you need one. The resulting distribution can be found in `metafacture-core/metafacture-runner/build/distributions/`:
```bash
$ ./gradlew assembleDist
```

See [Code Quality and Style](https://github.com/metafacture/metafacture-core/wiki/Code-Quality-and-Style) on the wiki for further information on the sources.

Expand Down
Loading
Loading