diff --git a/.github/VERSION.template b/.github/VERSION.template
new file mode 100644
index 0000000..a684504
--- /dev/null
+++ b/.github/VERSION.template
@@ -0,0 +1,4 @@
+#
+# This is a generated file. Edit VERSION.template instead
+#
+VERSION=@VERSION@
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
new file mode 100644
index 0000000..2d9e807
--- /dev/null
+++ b/.github/workflows/build.yml
@@ -0,0 +1,88 @@
+name: "Run tests and build with Ant on any branch"
+
+on:
+ push:
+ branches-ignore:
+ - "master"
+
+jobs:
+ build:
+ name: "Test and Build"
+ runs-on: ubuntu-latest
+ env:
+ INSTALL4J_KEY: ${{ secrets.INSTALL4J_LICENSE_KEY_1 }}
+ continue-on-error: false
+
+ steps:
+ - name: "Checkout repository"
+ uses: actions/checkout@v4
+ with:
+ fetch-tags: true
+ fetch-depth: 0
+
+ - name: "Generate version string"
+ id: get-version
+ run: |
+ VERSION=$(ant -q -S print_version)
+ echo "VERSION=${VERSION}" >> $GITHUB_OUTPUT
+ echo "TAG=v${VERSION}" >> $GITHUB_OUTPUT
+
+ - name: "Set up JDK 11"
+ uses: actions/setup-java@v3
+ with:
+ distribution: 'temurin'
+ java-version: 11
+
+ - name: "Sanity check"
+ id: sanity_check
+ run: |
+ # env
+ VERSION=${{ steps.get-version.outputs.VERSION }}
+ TAG=${{ steps.get-version.outputs.TAG }}
+ LASTTAG=$(git tag -l "v*" --sort='-committerdate' | head -1)
+
+ # version is v1.2.3
+ if [[ "${VERSION}" =~ ^[0-9][0-9]*[.][0-9][0-9]*[.][0-9][0-9]*$ ]]; then
+ echo "Version $VERSION is okay"
+ else
+ echo "Version format $VERSION is not okay!"
+ exit 1
+ fi
+
+ # tag is v1.2.3
+ if [[ "${TAG}" =~ ^v[0-9][0-9]*[.][0-9][0-9]*[.][0-9][0-9]*$ ]]; then
+ echo "Tag $TAG okay"
+ else
+ echo "Tag $TAG is not okay for version $VERSION!"
+ exit 1
+ fi
+
+ # new vesion defined
+ if [[ "$LASTTAG" == "$TAG" ]]; then
+ echo "Version not incremented, please update build.xml"
+ exit 1
+ else
+ echo "Version updated."
+ fi
+
+ - name: "Build with ant"
+ run: |
+ ant -noinput -buildfile build.xml distribute
+
+ - name: "Read RELEASENOTES and CHANGELOG"
+ id: changelog
+ run: |
+ cat RELEASENOTES.txt | iconv -f ISO-8859-1 > RELEASE.md
+ echo '' >> RELEASE.md
+ echo '## Excerpt from CHANGELOG' >> RELEASE.md
+ echo '' >> RELEASE.md
+ head -20 CHANGELOG.txt | iconv -f ISO-8859-1 >> RELEASE.md
+ echo '...' >> RELEASE.md
+
+ - name: "Upload binary artifacts"
+ uses: actions/upload-artifact@v4
+ with:
+ name: magellan2-plugins
+ path: |
+ RELEASE.md
+ release/*
diff --git a/.github/workflows/publish-latest.yml b/.github/workflows/publish-latest.yml
deleted file mode 100644
index f0443ec..0000000
--- a/.github/workflows/publish-latest.yml
+++ /dev/null
@@ -1,122 +0,0 @@
-name: Create pre-release
-# Test, build, and publish a release and tag it with "version-latest" on pushes to master
-
-on:
- push:
- branches:
- - "master"
-
-jobs:
- build:
- name: Create pre-release
- runs-on: ubuntu-latest
-
- steps:
- - uses: actions/checkout@v1
-
- - name: Generate version string
- id: get-version
- run: |
- VERSION=1.1.0
- SHORT=$(echo "${VERSION}" | cut -d. -f-2)
- echo "::set-env name=SHORT::$SHORT"
- echo "::set-env name=VERSION::$VERSION"
- echo "::set-env name=TAG::$(echo "v${SHORT}-latest")"
-
- - name: Set up JDK 11
- uses: actions/setup-java@v1
- with:
- java-version: 11
-
- - name: Sanity check
- run: |
- # tag is v1.2-latest
- if [[ "${TAG}" =~ ^v[0-9][0-9]*[.][0-9][0-9]*-latest$ ]]; then
- echo tag $TAG okay
- else
- echo "tag (${VERSION}, ${SHORT}) $TAG not okay!"
- exit 1
- fi
-
- for dir in *; do
- if [ -e $dir/.build.number ]; then
- echo $dir
-
- # most recent tag has older build number
- BUILD=$(cat $dir/.build.number | grep build.number | cut -f2 -d"=")
-
- LASTTAG=$(git tag -l v* --sort='-committerdate' | head -1)
- OLDBUILD=$(git show ${LASTTAG}:$dir/.build.number | grep build.number | cut -f2 -d"=")
- if [[ "$OLDBUILD" =~ ^[0-9][0-9]*$ ]]; then
- if (( BUILD == OLDBUILD )); then
- echo "not adding $dir, build number $BUILD has not changed"
- else
- # last -latest tag has older build number
- LASTTAG=$(git tag -l v*-latest --sort='-committerdate' | head -1)
- OLDBUILD=$(git show ${LASTTAG}:$dir/.build.number | grep build.number | cut -f2 -d"=")
- if [[ "$OLDBUILD" =~ ^[0-9][0-9]*$ ]]; then
- if (( BUILD <= OLDBUILD )); then
- echo "not adding $dir, build.number $BUILD has not changed"
- else
- echo "found new build $BUILD in $dir"
- updates="$updates $dir"
- fi
- else
- echo "warning, previous build not found for ${TAG}!"
- fi
- fi
- else
- echo "bad tag or build $LASTTAG - $OLDBUILD in $dir"
- fi
- fi
- done
- echo "::set-env name=UPDATES::$(echo $updates)"
-
-
- - name: Build with ant
- run: ant -noinput -buildfile build.xml
-
- - name: Check if release is wanted
- run: |
- echo "0 $UPDATES 1 ${{ env.UPDATES }}"
- for dir in ${{ env.UPDATES }}; do
- installer=$(ls $dir/release/*)
- if [ -f $installer ]; then
- uploads="$uploads $installer"
- else
- echo "could not find installer $installer"
- fi
- done
-
- echo "::set-env name=UPLOADS::$(echo $uploads)"
-
- echo "1 $uploads 2 $UPLOADS 3 ${{ env.UPLOADS }}"
-
- if [ -z "$uploads" ]; then
- echo "No new versions found. To create a new release, you must update and push the .build.number file of one or more plugins."
- exit 1
- fi
-
- - name: Publish git tag "vX.Y-latest"
- run: |
- git config user.name "$GITHUB_ACTOR"
- git config user.email "$GITHUB_ACTOR@users.noreply.github.com"
- git remote -v
- git tag -f "${TAG}"
- REMOTE="https://$GITHUB_ACTOR:${{ secrets.GITHUB_TOKEN }}@github.com/$GITHUB_REPOSITORY.git"
- git push --force "$REMOTE" "${TAG}"
-
- - name: Create release
- uses: meeDamian/github-release@2.0
- with:
- prerelease: true
- allow_override: true
- token: ${{ secrets.GITHUB_TOKEN }}
- commitish: master
- tag: ${{ env.TAG }}
- name: Pre-Release v${{ env.VERSION }}
- body: |
- These are the latest builds of the plugins for Magellan. You need Magellan to use them. To install, call the installer with `java -jar xyz-installer.jar` and install into your Magellan directory.
- gzip: folders
- files: ${{ env.UPLOADS }}
-
diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml
new file mode 100644
index 0000000..ab146b9
--- /dev/null
+++ b/.github/workflows/publish.yml
@@ -0,0 +1,142 @@
+name: "Run tests, build artifacts, publish on default branch"
+
+on:
+ push:
+ branches:
+ - "master"
+
+jobs:
+ build:
+ name: "Test, Build and Create Release"
+ runs-on: ubuntu-latest
+ env:
+ INSTALL4J_KEY: ${{ secrets.INSTALL4J_LICENSE_KEY_1 }}
+ continue-on-error: false
+
+ steps:
+ - name: "Checkout repository"
+ uses: actions/checkout@v4
+ with:
+ fetch-tags: true
+ fetch-depth: 0
+
+ - name: "Generate version string"
+ id: get-version
+ run: |
+ VERSION=$(ant -q -S print_version)
+ echo "VERSION=${VERSION}" >> $GITHUB_OUTPUT
+ echo "TAG=v${VERSION}" >> $GITHUB_OUTPUT
+
+ - name: "Set up JDK 11"
+ uses: actions/setup-java@v3
+ with:
+ distribution: 'temurin'
+ java-version: 11
+
+ - name: "Sanity check"
+ id: sanity_check
+ run: |
+ # env
+ VERSION=${{ steps.get-version.outputs.VERSION }}
+ TAG=${{ steps.get-version.outputs.TAG }}
+ LASTTAG=$(git tag -l "v*" --sort='-committerdate' | head -1)
+
+ # version is v1.2.3
+ if [[ "${VERSION}" =~ ^[0-9][0-9]*[.][0-9][0-9]*[.][0-9][0-9]*$ ]]; then
+ echo "Version $VERSION is okay"
+ else
+ echo "Version format $VERSION is not okay!"
+ exit 1
+ fi
+
+ # tag is v1.2.3
+ if [[ "${TAG}" =~ ^v[0-9][0-9]*[.][0-9][0-9]*[.][0-9][0-9]*$ ]]; then
+ echo "Tag $TAG okay"
+ else
+ echo "Tag $TAG is not okay for version $VERSION!"
+ exit 1
+ fi
+
+ # new vesion defined
+ if [[ "$LASTTAG" == "$TAG" ]]; then
+ echo "Version not incremented, please update build.xml"
+ exit 1
+ else
+ echo "Version updated."
+ fi
+
+ - name: "Build with ant"
+ run: |
+ ant -noinput -buildfile build.xml distribute
+
+ - name: "Read RELEASENOTES and CHANGELOG"
+ id: changelog
+ run: |
+ cat RELEASENOTES.txt | iconv -f ISO-8859-1 > RELEASE.md
+ echo '' >> RELEASE.md
+ echo '## Excerpt from CHANGELOG' >> RELEASE.md
+ echo '' >> RELEASE.md
+ head -20 CHANGELOG.txt | iconv -f ISO-8859-1 >> RELEASE.md
+ echo '...' >> RELEASE.md
+
+ - name: "Upload binary artifacts"
+ uses: actions/upload-artifact@v4
+ with:
+ name: magellan2-plugins
+ path: |
+ RELEASE.md
+ release/*
+
+ - name: "Publish git tag vX.Y.Z"
+ env:
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+ run: |
+ TAG=${{ steps.get-version.outputs.TAG }}
+ git config user.name "$GITHUB_ACTOR"
+ git config user.email "$GITHUB_ACTOR@users.noreply.github.com"
+ git remote -v
+ gh release delete ${TAG} -y || echo "continuing ..."
+ git tag -f "${TAG}"
+ REMOTE="https://$GITHUB_ACTOR:${{ secrets.GITHUB_TOKEN }}@github.com/$GITHUB_REPOSITORY.git"
+ git push --force "$REMOTE" "${TAG}"
+
+ - name: "Create Release"
+ uses: softprops/action-gh-release@v2
+ with:
+ target_commitish: master
+ tag_name: ${{ steps.get-version.outputs.TAG }}
+ draft: true
+ name: ${{ steps.get-version.outputs.TAG }}
+ body_path: RELEASE.md
+ files: |
+ README.md
+ RELEASENOTES.md
+ CHANGELOG.md
+ VERSION
+ release/*
+
+ - name: "Trigger meta action to inform homepage"
+ run: |
+ curl -sS -o meta.log \
+ -X POST https://api.github.com/repos/${{ github.repository_owner }}/magellan2.github.io/dispatches \
+ -H 'Accept: application/vnd.github+json' \
+ -H 'Authorization: token ${{ secrets.META_REPO_ACCESS }}' \
+ --data '{
+ "event_type": "actions-release-trigger",
+ "client_payload": {
+ "ref": "${{ github.ref }}",
+ "sha": "${{ github.sha }}",
+ "caller_repository": "${{ github.repository }}",
+ "meta_repository": "${{ github.repository_owner }}/magellan2.github.io",
+ "tag": "${{ steps.get-version.outputs.TAG }}",
+ "version": "${{ steps.get-version.outputs.VERSION }}",
+ "build": "",
+ "type": "plugins" }}'
+ if [ -s meta.log ]; then
+ cat meta.log
+ rm meta.log
+ exit -1
+ else
+ echo "meta action apparently successful"
+ rm meta.log
+ fi
diff --git a/.gitignore b/.gitignore
index 13bc8b4..e4bd9e9 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,2 +1,3 @@
release
-magellan2
\ No newline at end of file
+/magellan2
+/VERSION
diff --git a/.travis.yml b/.travis.yml
deleted file mode 100644
index 1455a15..0000000
--- a/.travis.yml
+++ /dev/null
@@ -1,24 +0,0 @@
-language: java
-
-jobs:
- include:
-# - state: test
-# name: Calling Ant to create distribution
-# script: ant run_tests
- - stage: deploy
- name: GitHub Release
- script:
- - ant distribute
- before_deploy:
- # Set up git user name and tag this commit
- - git config --local user.name "$GITHUB_USER"
- - git config --local user.email "$GITHUB_MAIL"
- - export TRAVIS_TAG=${TRAVIS_TAG:-$(date +'%Y%m%d%H%M%S')-$(git log --format=%h -1)}
- - git tag $TRAVIS_TAG
- deploy:
- provider: releases
- api_key: $GITHUB_OAUTH_TOKEN
- override: true
- file_glob: true
- file: release/*.jar
- skip_cleanup: true
diff --git a/CHANGELOG.md b/CHANGELOG.md
new file mode 100644
index 0000000..952523b
--- /dev/null
+++ b/CHANGELOG.md
@@ -0,0 +1,5 @@
+# 2025-05-28 - trickert (thoralf@m84.de)
+
+* Reparing build process
+* This version is now using Github Actions to create new releases.
+* switching to new global homepage https://magellan2.github.io/
diff --git a/LightHouseIcons/build.installer.xml b/LightHouseIcons/build.installer.xml
index ce87f21..8455920 100644
--- a/LightHouseIcons/build.installer.xml
+++ b/LightHouseIcons/build.installer.xml
@@ -77,7 +77,7 @@
+ value="${plugin.basename}-plugin-v${plugin.version}-${build.number}-installer.jar" />
@@ -121,7 +121,7 @@
-
+
diff --git a/MapCleaner/build.installer.xml b/MapCleaner/build.installer.xml
index dfd8670..46d332c 100644
--- a/MapCleaner/build.installer.xml
+++ b/MapCleaner/build.installer.xml
@@ -77,7 +77,7 @@
+ value="${plugin.basename}-plugin-v${plugin.version}-${build.number}-installer.jar" />
@@ -121,7 +121,7 @@
-
+
diff --git a/MapIcons/build.installer.xml b/MapIcons/build.installer.xml
index 1c17bc0..bd68674 100644
--- a/MapIcons/build.installer.xml
+++ b/MapIcons/build.installer.xml
@@ -77,7 +77,7 @@
+ value="${plugin.basename}-plugin-v${plugin.version}-${build.number}-installer.jar" />
@@ -121,7 +121,7 @@
-
+
diff --git a/MemoryWatch/build.installer.xml b/MemoryWatch/build.installer.xml
index d97656f..8a2c202 100644
--- a/MemoryWatch/build.installer.xml
+++ b/MemoryWatch/build.installer.xml
@@ -77,7 +77,7 @@
+ value="${plugin.basename}-plugin-v${plugin.version}-${build.number}-installer.jar" />
@@ -121,7 +121,7 @@
-
+
diff --git a/PluginTemplate/build.installer.xml b/PluginTemplate/build.installer.xml
index a4caf13..e9399aa 100644
--- a/PluginTemplate/build.installer.xml
+++ b/PluginTemplate/build.installer.xml
@@ -77,7 +77,7 @@
+ value="${plugin.basename}-plugin-v${plugin.version}-${build.number}-installer.jar" />
@@ -121,7 +121,7 @@
-
+
diff --git a/README.md b/README.md
index 2676049..f34423b 100644
--- a/README.md
+++ b/README.md
@@ -1,7 +1,57 @@
-(https://travis-ci.org/magellan2/magellan2-extensions-plugins.svg?branch=master)
-
# Magellan2 Extensions Plugins
Here you can find some additional plugins, that you can drop into Magellan2.
-Please have a look into the subfolders for more informations.
\ No newline at end of file
+Please have a look into the subfolders for more informations.
+
+- [Alliance Plugin](allianceplugin/)
+- [Lighthouse Plugin](LightHouseIcons/)
+- [Map Cleaner Plugin](MapCleaner/)
+- [MapIcons Plugin](MapIcons/)
+- [MemoryWatch Plugin](MemoryWatch/)
+- [ShipLoader Plugin](ShipLoader/)
+- [Statistics Plugin](statistics/)
+- [Teacher Plugin](Teacher/)
+
+As a template for new plugins, see [Plugin Template](PluginTemplate/).
+
+
+## How To Compile
+
+Actually the Magellan Plugins are very old.At the moment of writing, we do support only Java11, even when Java24 is already available. The limitatin is currently set by the Izpack installer in. We are working on that, and try to upgrade that dependency and can switch to a newer Java version.
+
+With (f.e.) Eclipse IDE it is very easy to import this repository as a project. Also running the project with newer JDKs is not an issue. It works out of the box
+
+- checkout the source dependency from https://github.com/magellan2/magellan2
+- checkout the sources from https://github.com/magellan2/magellan2-extensions-plugins
+- in Eclipse or your prefered Java IDE open the project from file system.. and import any project as a sub project
+- maybe add your current JRE system library to the Eclipse project.
+
+To build a complete new release, we are still using Apache Ant and Java 11. To install Ant follow the instructions on https://ant.apache.org/. I'm using Homebrew with `brew install ant`. Worked as expected. But it's also included in this repository
+
+There is only one useful target within the ant configuration:
+
+ ant -noinput -buildfile build.xml distribute
+
+It calls every subproject and creates the corresponding installer.
+
+## How To Run
+
+When the installer jars are generated, you can start them. The installer asks for the installation directory of your Magellan2 client. Point to that directory and let the installer copy the plugin into the Magellan2 client directory.
+
+## How To Release
+
+The process of new creating a new release is currently a bit difficulty.
+
+- we protect the default branch, so it's not possible to commit anything to it without a merge request. When you develop a new feature or a fix a bug, you should create at least one new branch (like `develop`). Every changes must be done there. We have created a Github action that runs on your branch to test, if the application can be compiled.
+- then you need to manually update `build.xml` and update the properties `VERSION.MAJOR`, `VERSION.MINOR` and `VERSION.SUB` as the Semantic versioning says. `VERSION.SUB` should increase for any bugfix release, `VERSION.MINOR` should be increased for any feature release and `VERSION.MAJOR` should be increased on major changes.
+- validate, if also the izpack-install.template.xml is up2date with the new version number etc.
+- commit and push everything into your branch
+- create a pull request
+- when the PR is approved, the build pipeline should run again and should create a stable release, see `.github/workflow/publish.yml`. It contains installer for Java. It also updates the home page and informs users about a new release.
+
+At the moment, every plugin has it's own version number. And Magellan2 client also has a version number. There is no concrete fit between all of that. So take care, which plugin version do you install into which Magellan version.
+
+## How to Distribute
+
+Please feel free to distribute your ideas. Just create a Pull-Request like described above. Update `build.xml` and `README.md`.
diff --git a/RELEASENOTES.md b/RELEASENOTES.md
new file mode 100644
index 0000000..dba4060
--- /dev/null
+++ b/RELEASENOTES.md
@@ -0,0 +1,7 @@
+A new release was published.
+
+These are the latest builds of the plugins for Magellan. You need Magellan to use them. To install, call the installer with `java -jar xyz-installer.jar` and install into your Magellan directory.
+
+The following plugins are updated.
+
+* none
diff --git a/ShipLoader/build.installer.xml b/ShipLoader/build.installer.xml
index 7ddaa25..36845e8 100644
--- a/ShipLoader/build.installer.xml
+++ b/ShipLoader/build.installer.xml
@@ -77,7 +77,7 @@
+ value="${plugin.basename}-plugin-v${plugin.version}-${build.number}-installer.jar" />
@@ -121,7 +121,7 @@
-
+
diff --git a/Teacher/build.installer.xml b/Teacher/build.installer.xml
index 82a6480..d077301 100644
--- a/Teacher/build.installer.xml
+++ b/Teacher/build.installer.xml
@@ -77,7 +77,7 @@
+ value="${plugin.basename}-plugin-v${plugin.version}-${build.number}-installer.jar" />
@@ -121,7 +121,7 @@
-
+
diff --git a/allianceplugin/build.installer.xml b/allianceplugin/build.installer.xml
index 2ce6bf0..37de6d5 100644
--- a/allianceplugin/build.installer.xml
+++ b/allianceplugin/build.installer.xml
@@ -77,7 +77,7 @@
+ value="${plugin.basename}-plugin-v${plugin.version}-${build.number}-installer.jar" />
@@ -121,7 +121,7 @@
-
+
diff --git a/build.xml b/build.xml
index 171a34f..1612b8c 100644
--- a/build.xml
+++ b/build.xml
@@ -5,8 +5,25 @@
want to use this script to compile a Install-JAR file.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/statistics/build.installer.xml b/statistics/build.installer.xml
index 92663c2..0cf884f 100644
--- a/statistics/build.installer.xml
+++ b/statistics/build.installer.xml
@@ -77,7 +77,7 @@
+ value="${plugin.basename}-plugin-v${plugin.version}-${build.number}-installer.jar" />
@@ -121,7 +121,7 @@
-
+