Skip to content

Commit

Permalink
Merge pull request #97 from ConductionNL/merge-main-to-dev
Browse files Browse the repository at this point in the history
main to dev
  • Loading branch information
remko48 authored Oct 14, 2024
2 parents 34f5e4d + 67cd0ba commit 0a74fda
Show file tree
Hide file tree
Showing 162 changed files with 5,958 additions and 5,522 deletions.
95 changes: 61 additions & 34 deletions .github/workflows/release-workflows.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,26 +4,50 @@ on:
push:
branches:
- master
- main
workflow_dispatch:
inputs:
version:
description: 'Version to release (leave empty to use info.xml version)'
required: false
default: ''

jobs:
release-management:
runs-on: ubuntu-latest
steps:

- name: Checkout Code
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Set app env
run: |
# Split and keep last
echo "APP_NAME=${GITHUB_REPOSITORY##*/}" >> $GITHUB_ENV
echo "APP_VERSION=${GITHUB_REF##*/}" >> $GITHUB_ENV
# Step 1: Checkout the code
- name: Checkout Code
uses: actions/checkout@v3
with:
ref: ${{ github.head_ref }} # Checkout the correct branch name
fetch-depth: 0 # Fetch the whole repo history
- name: Get current version and increment
id: increment_version
run: |
current_version=$(grep -oP '(?<=<version>)[^<]+' appinfo/info.xml)
IFS='.' read -ra version_parts <<< "$current_version"
((version_parts[2]++))
new_version="${version_parts[0]}.${version_parts[1]}.${version_parts[2]}"
echo "NEW_VERSION=$new_version" >> $GITHUB_ENV
echo "new_version=$new_version" >> $GITHUB_OUTPUT
- name: Update version in info.xml
run: |
sed -i "s|<version>.*</version>|<version>${{ env.NEW_VERSION }}</version>|" appinfo/info.xml
# Step 2: Prepare the signing certificate and key
- name: Commit version update
run: |
git config --local user.email "[email protected]"
git config --local user.name "GitHub Action"
git commit -am "Bump version to ${{ env.NEW_VERSION }}"
git push
# Step 1: Prepare the signing certificate and key
- name: Prepare Signing Certificate and Key
run: |
echo "${{ secrets.NEXTCLOUD_SIGNING_CERT }}" > signing-cert.crt
Expand Down Expand Up @@ -51,10 +75,10 @@ jobs:
# Step 7: Build composer dependencies
- run: composer i --no-dev

# Step 8: Copy the files into the package directory, excluding .git and package itself
# Step 8: Copy the files into the package directory
- name: Copy the package files into the package
run: |
mkdir -p package/opencatalogi
mkdir -p package/${{ github.event.repository.name }}
rsync -av --progress \
--exclude='package' \
--exclude='.git' \
Expand All @@ -63,7 +87,7 @@ jobs:
--exclude='docker' \
--exclude='docs' \
--exclude='node_modules' \
--exclude='src' \
--exclude='/src' \
--exclude='test' \
--exclude='package-lock.json' \
--exclude='composer.lock' \
Expand All @@ -90,17 +114,17 @@ jobs:
--exclude='stylelint.config.js' \
--exclude='.babelrc' \
--exclude='.nvmrc' \
./ package/opencatalogi/
./ package/${{ github.event.repository.name }}/
# Step 9: Create the TAR.GZ archive with code in opencatalogi directory
# Step 9: Create the TAR.GZ archive
- name: Create Tarball
run: |
cd package && tar -czf ../nexcloud-release.tar.gz opencatalogi
cd package && tar -czf ../nextcloud-release.tar.gz ${{ github.event.repository.name }}
# Step 10: Sign the TAR.GZ file with OpenSSL
- name: Sign the TAR.GZ file with OpenSSL
run: |
openssl dgst -sha512 -sign signing-key.key nexcloud-release.tar.gz | openssl base64 -out nexcloud-release.signature
openssl dgst -sha512 -sign signing-key.key nextcloud-release.tar.gz | openssl base64 -out nextcloud-release.signature
# Step 11: Generate Git version information
- name: Git Version
Expand All @@ -118,52 +142,55 @@ jobs:
# Step 13: Run Changelog CI
- name: Run Changelog CI
if: github.ref == 'refs/heads/master'
if: github.ref == 'refs/heads/main'
uses: saadmk11/[email protected]
with:
release_version: ${{ steps.version.outputs.version }}
release_version: ${{ env.NEW_VERSION }}
config_file: changelog-ci-config.json

# Step 14: Output the version
- name: Use the version
run: |
echo ${{ steps.version.outputs.version }}
# Step 15: Copy the files into the package directory, excluding .git and package itself
# Step 15: Copy the package files into the package (this step seems redundant, consider removing)
- name: Copy the package files into the package
run: |
mkdir -p package/opencatalogi
rsync -av --progress --exclude='package' --exclude='.git' ./ package/opencatalogi/
mkdir -p package/${{ github.event.repository.name }}
rsync -av --progress --exclude='package' --exclude='.git' ./ package/${{ github.event.repository.name }}/
# Step 18: Create a new release on GitHub
- name: Upload Release
uses: ncipollo/[email protected]
with:
artifacts: |
LICENSE.md
nexcloud-release.tar.gz
nexcloud-release.signature
opencatalogi-build.zip
opencatalogi-build.tar.gz
token: ${{ secrets.GITHUB_TOKEN }}
tag: ${{ steps.version.outputs.version }}
tag: v${{ env.NEW_VERSION }}
name: Release ${{ env.NEW_VERSION }}
draft: false
prerelease: false

- name: Attach tarball to github release
uses: svenstaro/upload-release-action@04733e069f2d7f7f0b4aebc4fbdbce8613b03ccd # v2
id: attach_to_release
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: nexcloud-release.tar.gz
asset_name: ${{ env.APP_NAME }}-${{ env.APP_VERSION }}.tar.gz
tag: ${{ github.ref }}
file: nextcloud-release.tar.gz # Corrected spelling
asset_name: ${{ env.APP_NAME }}-${{ env.NEW_VERSION }}.tar.gz
tag: v${{ env.NEW_VERSION }}
overwrite: true

- name: Upload app to Nextcloud appstore
uses: nextcloud-releases/nextcloud-appstore-push-action@a011fe619bcf6e77ddebc96f9908e1af4071b9c1 # v1
with:
app_name: ${{ env.APP_NAME }}
appstore_token: ${{ secrets.NEXTCLOUD_APPSTORE_TOKEN }}
download_url: ${{ steps.attach_to_release.outputs.browser_download_url }}
download_url: https://github.com/${{ github.repository }}/releases/download/v${{ env.NEW_VERSION }}/${{ env.APP_NAME }}-${{ env.NEW_VERSION }}.tar.gz
app_private_key: ${{ secrets.NEXTCLOUD_SIGNING_KEY }}

nightly: false

- name: Verify version and contents
run: |
echo "App version: ${{ env.NEW_VERSION }}"
echo "Tarball contents:"
tar -tvf nextcloud-release.tar.gz
echo "info.xml contents:"
tar -xOf nextcloud-release.tar.gz ${{ env.APP_NAME }}/appinfo/info.xml
8 changes: 4 additions & 4 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@
"Matadata",
"nextcloud",
"opencatalogi",
"organisation",
"Organisation",
"organisations",
"Organisations",
"organization",
"Organization",
"organizations",
"Organizations",
"pinia",
"Toegangs"
],
Expand Down
9 changes: 7 additions & 2 deletions appinfo/info.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Create a [bug report](https://github.com/OpenCatalogi/.github/issues/new/choose)
Create a [feature request](https://github.com/OpenCatalogi/.github/issues/new/choose)
]]></description>
<version>0.6.5</version>
<version>0.6.18</version>
<licence>agpl</licence>
<author mail="[email protected]" homepage="https://www.conduction.nl/">Conduction</author>
<author mail="[email protected]" homepage="https://acato.nl/">Acato</author>
Expand Down Expand Up @@ -66,5 +66,10 @@ Create a [feature request](https://github.com/OpenCatalogi/.github/issues/new/ch
<icon>app.svg</icon>
<type>link</type>
</navigation>
</navigations>
</navigations>

<settings>
<admin>OCA\OpenCatalogi\Settings\OpenCatalogiAdmin</admin>
<admin-section>OCA\OpenCatalogi\Sections\OpenCatalogiAdmin</admin-section>
</settings>
</info>
50 changes: 26 additions & 24 deletions appinfo/routes.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,36 +2,38 @@

return [
'resources' => [
'metadata' => ['url' => '/api/metadata'],
'publication_types' => ['url' => '/api/publication_types'],
'publications' => ['url' => '/api/publications'],
'organisations' => ['url' => '/api/organisations'],
'organizations' => ['url' => '/api/organizations'],
'themes' => ['url' => '/api/themes'],
'attachments' => ['url' => '/api/attachments'],
'catalogi' => ['url' => '/api/catalogi'],
'directory' => ['url' => '/api/directory']
'listing' => ['url' => '/api/listing'],
],
'routes' => [
// Custom
['name' => 'listing#synchronise', 'url' => '/api/listing/synchronise/{id?}', 'verb' => 'POST'],
['name' => 'directory#index', 'url' => '/api/directory', 'verb' => 'GET'],
['name' => 'directory#view', 'url' => '/api/directory/{id}', 'verb' => 'GET'],
['name' => 'directory#update', 'url' => '/api/directory', 'verb' => 'POST'],
// Dashboard
['name' => 'dashboard#index', 'url' => '/index', 'verb' => 'GET'],
['name' => 'dashboard#page', 'url' => '/', 'verb' => 'GET'],
['name' => 'metadata#page', 'url' => '/metadata', 'verb' => 'GET'],
['name' => 'publications#page', 'url' => '/publications', 'verb' => 'GET'],
['name' => 'publications#attachments', 'url' => '/api/publications/{id}/attachments', 'verb' => 'GET', 'requirements' => ['id' => '.+']],
['name' => 'publications#attachmentsInternal', 'url' => '/api/publications/{id}/attachments/internal', 'verb' => 'GET', 'requirements' => ['id' => '.+']],
['name' => 'publications#download', 'url' => '/api/publications/{id}/download', 'verb' => 'GET', 'requirements' => ['id' => '.+']],
['name' => 'catalogi#page', 'url' => '/catalogi', 'verb' => 'GET'],
['name' => 'search#index', 'url' => '/search', 'verb' => 'GET'],
['name' => 'search#index', 'url' => '/api/search', 'verb' => 'GET'],
['name' => 'search#indexInternal', 'url' => '/api/search/internal', 'verb' => 'GET'],
['name' => 'search#show', 'url' => '/api/search/{id}', 'verb' => 'GET', 'requirements' => ['id' => '.+']],
['name' => 'search#showInternal', 'url' => '/api/search/internal/{id}', 'verb' => 'GET', 'requirements' => ['id' => '.+']],
['name' => 'search#preflighted_cors', 'url' => '/api/{path}', 'verb' => 'OPTIONS', 'requirements' => ['path' => '.+']],
['name' => 'themes#index', 'url' => '/search/themes', 'verb' => 'GET'],
['name' => 'themes#index', 'url' => '/api/search/themes', 'verb' => 'GET'],
['name' => 'themes#indexInternal', 'url' => '/api/themes', 'verb' => 'GET'],
['name' => 'themes#show', 'url' => '/api/search/themes/{id}', 'verb' => 'GET', 'requirements' => ['id' => '.+']],
['name' => 'themes#showInternal', 'url' => '/api/themes/{id}', 'verb' => 'GET', 'requirements' => ['id' => '.+']],
['name' => 'directory#page', 'url' => '/directory', 'verb' => 'GET'],
['name' => 'directory#synchronise', 'url' => '/api/directory/{id}/sync', 'verb' => 'GET', 'requirements' => ['id' => '.+']],
// Publications
['name' => 'publications#attachments', 'url' => '/api/publications/{id}/attachments', 'verb' => 'GET'],
['name' => 'publications#download', 'url' => '/api/publications/{id}/download', 'verb' => 'GET'],
// user Settings & Global Configuration
['name' => 'settings#index', 'url' => '/settings', 'verb' => 'GET'],
['name' => 'settings#create', 'url' => '/settings', 'verb' => 'POST'],
['name' => 'configuration#index', 'url' => '/configuration', 'verb' => 'GET'],
['name' => 'configuration#create', 'url' => '/configuration', 'verb' => 'POST']
],
['name' => 'configuration#update', 'url' => '/configuration', 'verb' => 'PUT'],
// Search
['name' => 'search#preflighted_cors', 'url' => '/api/search/{path}', 'verb' => 'OPTIONS', 'requirements' => ['path' => '.+']],
['name' => 'search#index', 'url' => '/api/search', 'verb' => 'GET'],
['name' => 'search#publications', 'url' => '/api/search/publications', 'verb' => 'GET'],
['name' => 'search#publication', 'url' => '/api/search/publications/{publicationId}', 'verb' => 'GET', 'requirements' => ['publicationId' => '\d+']],
['name' => 'search#attachments', 'url' => '/api/search/publications/{publicationId}/attachments', 'verb' => 'GET', 'requirements' => ['publicationId' => '\d+']],
['name' => 'search#theme', 'url' => '/api/search/themes', 'verb' => 'GET'],
['name' => 'search#themes', 'url' => '/api/search/themes/{themeId}', 'verb' => 'GET', 'requirements' => ['themeId' => '\d+']]
]
];
12 changes: 11 additions & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,21 @@ volumes:
config:

services:
frontend:
portal:
image: acatonl/woo-ui-develop
ports:
- "8081:80"

catalog:
image: ghcr.io/opencatalogi/web-app:dev
ports:
- "8082:8080"

woo:
image: ghcr.io/conductionnl/woo-website:dev
ports:
- "8083:8080"

db:
image: mariadb:10.6
restart: always
Expand Down
Binary file added docs/.gitbook/assets/image (3).png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/.gitbook/assets/image (4).png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
11 changes: 5 additions & 6 deletions docs/README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
***

---
description: >-
Welkom bij de gebruikersdocumentatie voor de OpenCatalogi Nextcloud App. Veel
succes met het gebruik van de app.
----------------------------------
Welkom bij de gebruikersdocumentatie voor de OpenCatalogi Nextcloud App. Veel
succes met het gebruik van de app.
---

# Welkom

Expand All @@ -24,4 +23,4 @@ Deze documentatie is bedoeld voor diverse doelgroepen:

Voor meer informatie over OpenCatalogi en onze gemeenschappelijke inspanningen, bezoek onze [documentatie-pagina](https://documentatie.opencatalogi.nl) of de officiële website op [OpenCatalogi.nl](https://opencatalogi.nl).

Veel succes met het gebruik van de app. Voor vragen of bijdragen, neem gerust contact met ons op via <[email protected]>.
Veel succes met het gebruik van de app. Voor vragen of bijdragen, neem gerust contact met ons op via [[email protected]](mailto:[email protected]).
11 changes: 5 additions & 6 deletions docs/beheerders/README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
***

---
description: >-
De rol van een "Beheerder" binnen het platform is gericht op het beheren van
de publicaties, catalogi en metadata, evenals de autorisatie van gebruikers.
De verantwoordelijkheden van de beheerder:
------------------------------------------
De rol van een "Beheerder" binnen het platform is gericht op het beheren van
de publicaties, catalogi en metadata, evenals de autorisatie van gebruikers.
De verantwoordelijkheden van de beheerder:
---

# Beheerders

Expand Down
11 changes: 5 additions & 6 deletions docs/developers/README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
***

---
description: >-
De rol van een "Developer" binnen het publicatieplatform is voornamelijk
gericht om bij te dragen aan de ontwikkeling aan de codebase of om
aanpassingen te kunnen testen of demonstreren.
----------------------------------------------
De rol van een "Developer" binnen het publicatieplatform is voornamelijk
gericht om bij te dragen aan de ontwikkeling aan de codebase of om
aanpassingen te kunnen testen of demonstreren.
---

# Developers

Expand Down
Loading

0 comments on commit 0a74fda

Please sign in to comment.