Skip to content

Commit

Permalink
bump version to 1.18.0
Browse files Browse the repository at this point in the history
  • Loading branch information
adamgauthier committed Aug 29, 2023
1 parent cf82e29 commit 01348d5
Show file tree
Hide file tree
Showing 7 changed files with 87 additions and 7 deletions.
21 changes: 21 additions & 0 deletions docs/release-notes/1.18.0_changelog.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# TaylorBot v1.18.0 Release Notes 📝

- Added **/location** commands! 📍
- Use **/location set** to set your location to a nearby city ✅
- Use **/location time** to see the location and current time for you or your friends 🕰️
- Use **/location weather** (previously **/weather**) to see the current weather at your location 🌦
- Most of these commands are ported from the prefixed commands, with improvements ♻️

- Added **/taypoints gift** to replace prefixed **Gift**! 🪙
- Redesigned output giving more information about the transfer 🎁

- Added **/channel messages** to replace prefixed **ChannelStats**! 📈
- Redesigned output showing the message count and spam status of any text channel 📝

- Added **/server** commands! 🍽️
- **/server population** replaces prefixed **ServerStats**, offering age and gender statistics for the current server 📊
- **/server names** replaces prefixed **ServerNames** to retrieve a list of previous names for the current server 📜

- Added **/mod spam add** and **/mod spam remove** to replace prefixed **AddSpamChannel** and **RemoveSpamChannel**! 🐟

- Significant behind the scenes database infrastructure improvements ⚡
8 changes: 5 additions & 3 deletions src/taylorbot-postgres/local/deploy-postgres.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ docker container run \
--mount type=bind,source=${data_path},destination=/var/lib/postgresql/data \
--mount type=bind,source=${backups_path},destination=/home/pg-backups \
--publish 14487:5432 \
postgres:12
postgres:15

echo "Waiting for database server to be ready..."
sleep 20
Expand All @@ -36,6 +36,8 @@ echo "Creating taylorbot role..."
docker exec --interactive ${container_name} \
psql --username=postgres --command="CREATE ROLE taylorbot WITH LOGIN PASSWORD '${taylorbot_role_password}';"
docker exec --interactive ${container_name} \
createdb --username=postgres --owner=taylorbot taylorbot
psql --username=postgres --command="CREATE DATABASE taylorbot;"
docker exec --interactive ${container_name} \
psql --username=postgres --dbname=taylorbot --command="CREATE EXTENSION IF NOT EXISTS pgcrypto WITH SCHEMA public;"
psql --username=postgres --command="GRANT ALL PRIVILEGES ON DATABASE taylorbot TO taylorbot;"
docker exec --interactive ${container_name} \
psql --username=postgres --dbname=taylorbot --command="GRANT ALL ON SCHEMA public TO taylorbot;"
18 changes: 18 additions & 0 deletions src/taylorbot-postgres/sqitch/deploy/0042_bump_version_1.18.0.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
-- Deploy taylorbot-postgres:0041_bump_version_1.18.0 to pg

BEGIN;

UPDATE commands.messages_of_the_day
SET message = 'Use </location time:1141925890448691270> to see what time it is for your friend in a different part of the world!'
WHERE message = 'Use `{prefix}time` to see what time it is for any user that has set their location!';

UPDATE commands.messages_of_the_day
SET message = 'Feeling generous? Use </taypoints gift:1103846727880028180> to send some of your taypoints to a friend!'
WHERE message = 'Feeling generous? Use `{prefix}gift` to send some of your points to a friend!';

INSERT INTO commands.messages_of_the_day (message) VALUES
('Use </location weather:1141925890448691270> to see the current weather where you or your friend are!');

UPDATE configuration.application_info SET info_value = '1.18.0' WHERE info_key = 'product_version';

COMMIT;
19 changes: 19 additions & 0 deletions src/taylorbot-postgres/sqitch/revert/0042_bump_version_1.18.0.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
-- Revert taylorbot-postgres:0041_bump_version_1.18.0 from pg

BEGIN;

UPDATE configuration.application_info SET info_value = '1.17.0' WHERE info_key = 'product_version';

DELETE FROM commands.messages_of_the_day WHERE
message = 'Use </location weather:1141925890448691270> to see the current weather where you or your friend are!'
;

UPDATE commands.messages_of_the_day
SET message = 'Feeling generous? Use `{prefix}gift` to send some of your points to a friend!'
WHERE message = 'Feeling generous? Use </taypoints gift:1103846727880028180> to send some of your taypoints to a friend!';

UPDATE commands.messages_of_the_day
SET message = 'Use `{prefix}time` to see what time it is for any user that has set their location!'
WHERE message = 'Use </location time:1141925890448691270> to see what time it is for your friend in a different part of the world!';

COMMIT;
1 change: 1 addition & 0 deletions src/taylorbot-postgres/sqitch/sqitch.plan
Original file line number Diff line number Diff line change
Expand Up @@ -43,3 +43,4 @@
0039_configure_log_cache 2023-05-16T02:49:20Z Adam Gauthier <[email protected]> # Add configurable content cache expiry for message log channels
0040_bump_version_1.17.0 2023-07-03T18:50:20Z Adam Gauthier <[email protected]> # Bump product version to 1.17.0
0041_age_role 2023-07-21T02:45:00Z Adam Gauthier <[email protected]> # Add age role configuration
0042_bump_version_1.18.0 2023-08-29T02:53:59Z Adam Gauthier <[email protected]> # Bump product version to 1.18.0
22 changes: 22 additions & 0 deletions src/taylorbot-postgres/sqitch/verify/0042_bump_version_1.18.0.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
-- Verify taylorbot-postgres:0041_bump_version_1.18.0 on pg

BEGIN;

DO $$
BEGIN
ASSERT (SELECT NOT EXISTS(SELECT FROM commands.messages_of_the_day WHERE
position('{prefix}time' in message) > 0
));

ASSERT (SELECT NOT EXISTS(SELECT FROM commands.messages_of_the_day WHERE
position('{prefix}gift' in message) > 0
));

ASSERT (SELECT EXISTS(SELECT FROM commands.messages_of_the_day WHERE
message = 'Use </location weather:1141925890448691270> to see the current weather where you or your friend are!'
));

ASSERT (SELECT info_value FROM configuration.application_info WHERE info_key = 'product_version') = '1.18.0';
END $$;

ROLLBACK;
5 changes: 1 addition & 4 deletions src/taylorbot-postgres/taylorbot-postgres.yml
Original file line number Diff line number Diff line change
Expand Up @@ -110,15 +110,12 @@ stages:
runOnce:
deploy:
steps:
# This assumes we have set up a remote postgres cluster with a "taylorbot" user who owns a "taylorbot" database, with the extension public.pgcrypto
# This assumes we have set up a remote postgres cluster with a "taylorbot" role who all privileges on a "taylorbot" database
- script: |
set -o errexit
set -o pipefail
set -o nounset
echo 'Resolving current machine IP address'
dig +short myip.opendns.com @resolver1.opendns.com
sqitch_bundle_path=$(Pipeline.Workspace)/taylorbot-sqitch-bundle
mkdir ${sqitch_bundle_path}
Expand Down

0 comments on commit 01348d5

Please sign in to comment.