Skip to content

Commit

Permalink
fix: update for ilias9
Browse files Browse the repository at this point in the history
  • Loading branch information
iFadi committed Nov 14, 2024
1 parent 07c86bd commit b733f59
Show file tree
Hide file tree
Showing 5 changed files with 66 additions and 5 deletions.
27 changes: 27 additions & 0 deletions .github/scripts/update_readme_version.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
#!/bin/bash

# Get the latest version (assuming it's stored in a file or as a Git tag)
latest_version=$(git describe --tags `git rev-list --tags --max-count=1`)

# Check if latest_version is not empty
if [ -z "$latest_version" ]; then
echo "Error: Could not determine latest version."
exit 1
fi

# Update the README.md file
sed -i "/^## Version/{N;s/.*/## Version\n$latest_version/}" README.md


# Check if README was updated
if ! git diff --exit-code --quiet README.md; then
# Configure Git (Replace with your details)
git config --global user.email "fadi@asbih.com"
git config --global user.name "Fadi Asbih"

# Add and commit changes
git add README.md
git commit -m "chore: update version in README to $latest_version"
else
echo "No changes to README.md"
fi
33 changes: 33 additions & 0 deletions .github/workflows/release-please.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
on:
push:
branches:
- main

permissions:
contents: write
pull-requests: write

name: release-please

jobs:
release-please:
runs-on: ubuntu-latest
steps:
- uses: google-github-actions/release-please-action@v4
with:
token: ${{ secrets.MY_RELEASE_PLEASE_TOKEN }}
release-type: simple

- name: Checkout code
uses: actions/checkout@v2
with:
fetch-depth: 0 # Fetches all history for all branches and tags

- name: Update README Version
run: bash .github/scripts/update_readme_version.sh

- name: Push changes
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: main
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.idea/
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ git clone https://github.com/iFadi/LUHShibAuth.git

Now check a specific Tag:
```bash
git checkout v1.0.2
git checkout v1.0.3
```
Goto "Administration -> Plugin" and install and activate the plugin.

Expand All @@ -40,4 +40,4 @@ to check if there are errors.

#### v1.0.1:
* Add falling back mechanism to the default ILIAS login, if "ext_account" is not available
* Login/Username is now all in capital
* Login/Username is now all in capital
6 changes: 3 additions & 3 deletions plugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
// alphanumerical ID of the plugin; never change this
$id = 'luhshibauth';
// code version; must be changed for all code changes
$version = '1.0.2';
$version = '1.0.3';
// ilias min and max version; must always reflect the versions that should
// run with the plugin
$ilias_min_version = "8.0";
$ilias_max_version = "8.99";
$ilias_min_version = "9.0";
$ilias_max_version = "9.99";

// optional, but useful: Add one or more responsible persons and a contact email
$responsible = "Stefan Meyer";
Expand Down

0 comments on commit b733f59

Please # to comment.