Skip to content

Commit

Permalink
Merge pull request #282 from Liturgical-Calendar/development
Browse files Browse the repository at this point in the history
Prepare v4.0 release
  • Loading branch information
JohnRDOrazio authored Jan 3, 2025
2 parents 436ebf7 + c4ae0ba commit 95f5409
Show file tree
Hide file tree
Showing 346 changed files with 67,211 additions and 23,208 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,13 @@ jobs:
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Check-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Update source file translation strings
id: update_pot
run: |
sudo apt-get install -y gettext
xgettext --from-code=UTF-8 --add-comments='translators:' --keyword="pgettext:1c,2" -o i18n/litcal.pot includes/LitCalAPI.php includes/LitMessages.php includes/FestivityCollection.php includes/enums/LitColor.php includes/enums/LitCommon.php includes/enums/LitGrade.php includes/enums/LitSeason.php
xgettext --from-code=UTF-8 --add-comments='translators:' --keyword="pgettext:1c,2" -o i18n/litcal.pot src/Paths/Calendar.php src/LatinUtils.php src/FestivityCollection.php src/Enum/LitColor.php src/Enum/LitCommon.php src/Enum/LitGrade.php src/Enum/LitSeason.php
echo "POT_LINES_CHANGED=$(git diff -U0 | grep '^[+|-][^+|-]' | grep -Ev '^[+-]"POT-Creation-Date' | wc -l)" >> $GITHUB_OUTPUT
# push the output folder to your repo
Expand Down
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,7 @@ engineCache/*
allowedOrigins.php
vendor/*
debug.log
ValidateTestsAgainstSchema.php
.envrc
debuginfo.php
testYaml.php
49 changes: 49 additions & 0 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
{
"version": "2.0.0",
"options": {
"env": {
"APP_PROTOCOL": "http",
"APP_HOST": "localhost",
"APP_PORT": "8000"
}
},
"tasks": [
{
"label": "launch-browser",
"type": "shell",
"windows": {
"command": "${command:workbench.action.terminal.sendSequence}",
"args": [
{
"text": "start ${APP_PROTOCOL}://${APP_HOST}:${APP_PORT}\n" // For Windows
}
],
"problemMatcher": []
},
"linux": {
"command": "/bin/bash",
"args": [
"-c",
"if grep -q microsoft /proc/version; then powershell.exe Start-Process ${APP_PROTOCOL}://${APP_HOST}:${APP_PORT}; else xdg-open ${APP_PROTOCOL}://${APP_HOST}:${APP_PORT}; fi"
],
"problemMatcher": []
},
"osx": {
"command": "open ${APP_PROTOCOL}://${APP_HOST}:${APP_PORT}", // For macOS
"problemMatcher": []
}
},
{
"label": "php-server",
"type": "shell",
"command": "PHP_CLI_SERVER_WORKERS=6 php -S ${APP_HOST}:${APP_PORT}",
"group": {
"kind": "build",
"isDefault": true
},
"dependsOn": [
"launch-browser"
]
}
]
}
87 changes: 87 additions & 0 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
# Code Of Conduct
## 1. Overview

The developers elected to govern their interactions with each other, with their clients, and with the larger user community in accordance with the "instruments of good works" from chapter 4 of The Rule of St. Benedict (hereafter: "The Rule"). This Rule has proven its mettle in thousands of diverse communities for over 1,500 years, and has served as a baseline for many civil law codes since the time of Charlemagne.

The Rule is strict, and none are able to comply perfectly. Grace is readily granted for minor transgressions. All are encourage to follow this rule closely, as in so doing they may expect to live happier, healthier, and more productive lives. The entire Rule is good and wholesome, and yet we make no enforcement of the more introspective aspects.

We view The Rule as our promise to all users of this project of how the developers are expected to behave. This is a one-way promise, or covenant. In other words, the developers are saying: "We will treat you this way regardless of how you treat us."

## 2. The Rule

1. First of all, love the Lord God with your whole heart, your whole soul, and your whole strength.
1. Then, love your neighbor as yourself.
1. Do not murder.
1. Do not commit adultery.
1. Do not steal.
1. Do not covet.
1. Do not bear false witness.
1. Honor all.
1. Do not do to another what you would not have done to yourself.
1. Deny oneself in order to follow Christ.
1. Chastise the body.
1. Do not become attached to pleasures.
1. Love fasting.
1. Relieve the poor.
1. Clothe the naked.
1. Visit the sick.
1. Bury the dead.
1. Be a help in times of trouble.
1. Console the sorrowing.
1. Be a stranger to the world's ways.
1. Prefer nothing more than the love of Christ.
1. Do not give way to anger.
1. Do not nurse a grudge.
1. Do not entertain deceit in your heart.
1. Do not give a false peace.
1. Do not forsake charity.
1. Do not swear, for fear of perjuring yourself.
1. Utter only truth from heart and mouth.
1. Do not return evil for evil.
1. Do no wrong to anyone, and bear patiently wrongs done to yourself.
1. Love your enemies.
1. Do not curse those who curse you, but rather bless them.
1. Bear persecution for justice's sake.
1. Be not proud.
1. Be not addicted to wine.
1. Be not a great eater.
1. Be not drowsy.
1. Be not lazy.
1. Be not a grumbler.
1. Be not a detractor.
1. Put your hope in God.
1. Attribute to God, and not to self, whatever good you see in yourself.
1. Recognize always that evil is your own doing, and to impute it to yourself.
1. Fear the Day of Judgment.
1. Be in dread of hell.
1. Desire eternal life with all the passion of the spirit.
1. Keep death daily before your eyes.
1. Keep constant guard over the actions of your life.
1. Know for certain that God sees you everywhere.
1. When wrongful thoughts come into your heart, dash them against Christ immediately.
1. Disclose wrongful thoughts to your spiritual mentor.
1. Guard your tongue against evil and depraved speech.
1. Do not love much talking.
1. Speak no useless words or words that move to laughter.
1. Do not love much or boisterous laughter.
1. Listen willingly to holy reading.
1. Devote yourself frequently to prayer.
1. Daily in your prayers, with tears and sighs, confess your past sins to God, and amend them for the future.
1. Fulfill not the desires of the flesh; hate your own will.
1. Obey in all things the commands of those whom God has placed in authority over you even though they (which God forbid) should act otherwise, mindful of the Lord's precept, "Do what they say, but not what they do."
1. Do not wish to be called holy before one is holy; but first to be holy, that you may be truly so called.
1. Fulfill God's commandments daily in your deeds.
1. Love chastity.
1. Hate no one.
1. Be not jealous, nor harbor envy.
1. Do not love quarreling.
1. Shun arrogance.
1. Respect your seniors.
1. Love your juniors.
1. Pray for your enemies in the love of Christ.
1. Make peace with your adversary before the sun sets.
1. Never despair of God's mercy.

## 3. Attribution

This code of conduct was taken from [The rule of St. Benedict, as your Code of Conduct](https://github.com/saint-benedict/code-of-conduct) which in turn was adapted from [SQLite's Code of conduct](https://web.archive.org/web/20181024103452/https://sqlite.org/codeofconduct.html) and now [Code of Ethics](https://sqlite.org/codeofethics.html).
101 changes: 0 additions & 101 deletions DateOfEaster.php

This file was deleted.

56 changes: 56 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
# Use the official PHP 8.3 CLI image as the base image
FROM php:8.4-cli AS build

# Install necessary PHP extensions and Composer in one step to minimize layers
RUN apt-get update -y && \
apt-get upgrade -y && \
apt-get install -y --no-install-suggests --no-install-recommends libicu-dev libonig-dev libzip-dev gettext libyaml-dev && \
docker-php-ext-install intl zip gettext calendar && \
pecl install yaml && \
docker-php-ext-enable intl zip gettext calendar yaml && \
curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*

# Set the working directory
WORKDIR /var/www/html

COPY composer.json composer.lock ./

# Run composer install to install dependencies
RUN composer install --no-interaction --prefer-dist --optimize-autoloader --no-dev

# Copy the rest of the application code (.dockerignore not working when building from docker compose and remote repo)
COPY ./src ./src
COPY ./i18n ./i18n
COPY ./jsondata ./jsondata
COPY LitCalTestServer.php index.php ./

# Stage 2: final build
FROM php:8.4-cli AS main

# Set the working directory
WORKDIR /var/www/html

# Copy the compiled PHP extensions from the build stage
COPY --from=build /usr/lib/x86_64-linux-gnu/libyaml* /usr/lib/x86_64-linux-gnu
COPY --from=build /usr/lib/x86_64-linux-gnu/libzip* /usr/lib/x86_64-linux-gnu
COPY --from=build /usr/local/lib/php/extensions /usr/local/lib/php/extensions
COPY --from=build /usr/local/etc/php/conf.d /usr/local/etc/php/conf.d
COPY --from=build /usr/local/bin/composer /usr/local/bin/composer
COPY --from=build /var/www/html /var/www/html

RUN apt-get update -y && \
apt-get upgrade -y && \
apt-get install -y --no-install-suggests --no-install-recommends locales-all && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*

# Expose port 8000 to the host
EXPOSE 8000

# Set the environment variable
ENV PHP_CLI_SERVER_WORKERS=6

# Command to run PHP's built-in server
CMD ["php", "-S", "0.0.0.0:8000", "-t", "/var/www/html"]
8 changes: 8 additions & 0 deletions Dockerfile.dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
*
!src
!i18n
!jsondata
!composer.json
!composer.lock
!LitCalTestServer.php
!index.php
Loading

0 comments on commit 95f5409

Please sign in to comment.