Skip to content

Commit 819d567

Browse files
authored
1 parent 047525c commit 819d567

20 files changed

Lines changed: 743 additions & 10 deletions

.github/workflows/package-and-attach-to-release.yml

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,26 @@ jobs:
1616
- name: Checkout
1717
uses: actions/checkout@v5.0.0
1818

19+
- name: Set environment to prod
20+
run: |
21+
sed -i "s/set_config(CONFKEY::SENTRY_ENV, ENVIRONMENT::DEV, 'local_lbplanner')/set_config(CONFKEY::SENTRY_ENV, ENVIRONMENT::PROD, 'local_lbplanner')/g" "$TARGET_FOLDER/version.php"
22+
1923
- name: Extract version
2024
id: version
2125
run: |
2226
version=$(grep -oP '\$plugin->version\s*=\s*\K[0-9]+' "$TARGET_FOLDER/version.php")
2327
2428
echo "version=$version" >> $GITHUB_OUTPUT
25-
29+
30+
- name: Setup PHP ${{ matrix.php }}
31+
uses: shivammathur/setup-php@v2
32+
with: # see gha.dist.yml
33+
php-version: '8.1'
34+
coverage: none
35+
- name: Get php libs
36+
run: |
37+
composer install -q --no-ansi --no-interaction --no-scripts --no-progress --prefer-dist
38+
2639
- name: Create ZIP file
2740
run: |
2841
ZIP_NAME="${MOODLE_INSTALL_DIR}_${PACKAGE_NAME}_${VERSION}.zip"

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,5 @@ moodle
22
*.zip
33
lbplanner.dart/test/env.dart
44
example
5-
.idea
5+
.idea
6+
lbplanner/vendor

.kateproject

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"settings": {
88
"intelephense": {
99
"environment": {
10-
"phpVersion": "8.0.0"
10+
"phpVersion": "8.1.0"
1111
}
1212
}
1313
}

README.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,29 @@
11
# LB Planer Plugin
22

33
This repository contains the source code for the LB Planer Moodle plugin. Api endpoints are documented [here](https://necodeit.github.io/lb_planner_docs/moodle/index.html)
4+
5+
## Setup
6+
7+
### Bundled Dependencies
8+
9+
Run `composer up` here to download dependencies to the vendor folder.
10+
Note that dependencies already present in moodle are excluded from the tree.
11+
12+
### Dev Env
13+
14+
You can do this multiple ways, but we personally have a directory structure like so:
15+
16+
```
17+
-root ← top folder. any name works
18+
|-plugin ← this folder
19+
|-moodle ← folder with moodle in it
20+
|-local ← moodle's plugin folder
21+
|-lbplanner ← symlink to the lbplanner folder
22+
|-modcustomfields ← a dependency of ours (get at https://gitlab.com/adapta/moodle-local_modcustomfields/)
23+
```
24+
25+
Using [kate](https://kate-editor.org/) with [intelephense](https://intelephense.com/) is recommended.
26+
27+
## Packaging
28+
29+
Zip the lbplanner folder. as shrimple as that.

composer.json

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
{
2+
"require": {
3+
"sentry/sentry": "^4.16",
4+
"php": ">=8.1"
5+
},
6+
"replace": {
7+
"symfony/deprecation-contracts": "*",
8+
"guzzlehttp/psr7": "*",
9+
"psr/http-factory": "*",
10+
"psr/http-message": "*",
11+
"psr/log": "*",
12+
"ralouphie/getallheaders": "*"
13+
},
14+
"config": {
15+
"vendor-dir": "lbplanner/vendor",
16+
"platform": {
17+
"php": "8.1.0"
18+
}
19+
}
20+
}

composer.lock

Lines changed: 294 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)