Merge branch 'main' into dev

dev
gravel 1 year ago
commit 43700b31a7
Signed by: gravel
GPG Key ID: C0538F3C906B308F

@ -16,7 +16,7 @@ sco: fetch html
# Refresh listing, generate HTML and update listing provider.
all:
/bin/php php/update-listing.php
/bin/php php/update-listing.php $(FLAGS)
# Fetch room listing.
fetch:
@ -87,7 +87,7 @@ test-noninteractive: FLAGS = --verbose
test-noninteractive: clean all
# Run Continuous Integration tests.
test-ci: FLAGS = --verbose --fast --no-color
test-ci: FLAGS = --verbose --no-color
test-ci: clean all
# -- Aliases --

@ -40,7 +40,7 @@ See [CONTRIBUTING.md](CONTRIBUTING.md) for information about running the project
## Policy
We require that content posted in Communities adheres to the Content Policy laid out in the [Session Terms of Service](https://getsession.org/terms-of-service). Additionally, we may consider Communities unsuitable for display if their content is in breach of copyright and/or encourages or instructs drug use. If Communities explicitly accept such content or fail to moderate such content, we may display these Communities only to users who have disabled JavaScript in their browser, or to none at all. We appreciate contact with and the continued vigilance of server operators to prevent any issues from arising that would lead to us de-listing your Community.
We require that content posted in Communities adheres to the Content Policy laid out in the [Session Terms of Service](https://getsession.org/terms-of-service). Additionally, we may consider Communities unsuitable for display if their content is in breach of copyright and/or encourages or instructs drug use. If Communities explicitly accept such content or fail to moderate such content, we may display these Communities only to users who have disabled JavaScript in their browser, or to none at all. For safety reasons, we may also hide Communities intended for testing. We appreciate contact with and the continued vigilance of server operators to prevent any issues from arising that would lead to us de-listing your Community.
We occassionally accept requests from server operators to de-list whole Community servers; this only applies in cases where we've previously listed them manually (read above about sources). If you feel our listing would be greatly detrimental to the users of your Communities, such as in cases where your Communities reveal sensitive information about your users, you may [contact us](#contact-us) to make such a request. Please note that Session Communities are not designed with private communication in mind and we reserve the right not to de-list your Communities in case they have been listed on one of our sources and/or in case you request to de-list only a subset of your Communities.

@ -1,20 +1,22 @@
#!/bin/bash
#!/bin/sh
root="$(pwd)"
branch=$(git symbolic-ref HEAD 2>/dev/null || echo "?")
branch="${branch##refs/heads/}"
# Only test changes on main branch
if ! [ "$branch" = "main" ]; then
exit 0;
fi
# Trigger cleanup if tests are interrupted.
cleanup() {
echo -e "\033[31mTests aborted.\033[0m"
printf "\033[31mTests aborted.\033[0m"
rm -rf "$root/.test";
exit;
}
trap cleanup SIGHUP SIGINT SIGABRT SIGTERM;
trap cleanup HUP INT ABRT TERM;
cat <<EOF
I see you've committed to $branch! Time to test.
@ -22,22 +24,37 @@ I see you've committed to $branch! Time to test.
EOF
# Remove test directory if present.
rm -rf "$root/.test"
# Make and change into test directory.
mkdir "$root/.test" || exit;
cd "$root/.test" || exit;
# Clone the current repository into the test directory and change into it.
git clone .. repo 2>> "$root/.test/results"
cd "$root/.test/repo" 2>> "$root/.test/results" || exit;
if make test-ci &>> "$root/.test/results"; then
touch "$root/.test/results";
# Run tests and show certain lines of output if successful.
if make test-ci > "$root/.test/results" 2>&1; then
grep 'Done fetching communities' -A1 --color=no "$root/.test/results";
grep -E 'Generated [[:digit:]]+ listings' -B1 --color=no "$root/.test/results";
cat <<EOF
Tests passed.
Run \`make dev\` to test it yourself.
Run \`make dev\` to test the webpage yourself.
EOF
else
echo -e "\033[31mTests failed.\033[0m";
# Show end of output if tests were not successful.
printf "\033[31mTests failed.\033[0m";
tail -n10 "$root/.test/results";
echo "See $root/.test/results for the full log."
exit;
exit 1;
fi
# Forget the cloned repository has version control to decrease clutter.
rm -rf "$root/.test/repo/.git" || exit;
# Return to main repository
cd "$root" || exit;
# rm -rf .test

@ -32,3 +32,7 @@ a, .anchorstyle {
border: 2px solid black;
border-radius: 1em;
}
#link-return {
float: right;
}

@ -63,18 +63,21 @@
<header>
<div id="header-start"></div>
<div id="header-end">
<a
id="link-about"
href="#footer"
title="Learn more about sessioncommunities.online."
>About</a>
<label
for="toggle-theme-switch"
class="anchorstyle"
title="Switch color theme"
>
Switch theme
</label>
>Switch theme</label>
<a
id="link-instructions"
target="_blank"
rel="help"
title="Mutli-language guide to joining communities using the site."
title="Multi-language guide to using the site."
href="instructions.html"
>Instructions</a>
</div>
@ -86,7 +89,7 @@
<hr>
<footer>
<footer id="footer">
<p id="server_summary">
<?=count_rooms($servers)?> unique Session Communities
on <?=count($servers)?> servers have been found.

@ -36,7 +36,7 @@
<h1>Instructions for joining Session Communities</h1>
</header>
<main>
<p>
<p id="link-return">
<a href="/" title="Return to the Session Community listing">
Go back to Community list
</a>

Loading…
Cancel
Save