File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11#! /usr/bin/env bash
22set -euo pipefail
33
4- ENV_FILE=" ${ENV_FILE:- .env} "
54function bail() {
65 echo " $@ "
76 exit 1
87}
98
10- # prerequesties
11- if [ ! -f " $ENV_FILE " ]; then
12- bail " Prerequesties not met: .env not found"
13- fi
14-
159case " $1 " in
1610ask)
1711 bun install --frozen-lockfile
18- bun --env-file=" $ENV_FILE " commands/ask.ts
12+ bun --env-file=.env commands/ask.ts
1913 ;;
2014check)
2115 bun install --frozen-lockfile
22- bun --env-file=" $ENV_FILE " commands/check.ts
16+ bun --env-file=.env commands/check.ts
2317 ;;
2418* )
2519 bail " [asakatsu-bot] Unknown Command: $1 "
Original file line number Diff line number Diff line change 11#! /usr/bin/env bash
22set -euo pipefail
33
4- function bail() {
5- echo " $@ "
6- exit 1
7- }
8-
9- ENV_FILE=" ${ENV_FILE:- .env} "
10- if [ ! -f " $ENV_FILE " ]; then
11- bail " Prerequesties not met: .env not found"
12- fi
13-
144bun install --frozen-lockfile
15- bun --env-file=" $ENV_FILE " start
5+ bun --env-file=.env start
Original file line number Diff line number Diff line change 11const { google } = require ( "googleapis" ) ;
22const { WebhookClient } = require ( "discord.js" ) ;
33const dayjs = require ( "dayjs" ) ;
4- const dotenv = require ( "dotenv" ) ;
5- dotenv . config ( { path : process . env . ENV_FILE } ) ;
4+ require ( "dotenv" ) . config ( ) ;
65
76const auth = new google . auth . GoogleAuth ( {
87 scopes : [ "https://www.googleapis.com/auth/webmasters.readonly" ] ,
Original file line number Diff line number Diff line change 66 schedule :
77 cron : " 0 12 * * *"
88 working_dir : bots/auto-moderator
9- run : ENV_FILE=~/run/discord-bots/auto-moderator.env ./run.sh
9+ run : ./run.sh
10+ env_file : ~/run/discord-bots/auto-moderator.env
1011
1112 gsc-report :
1213 schedule :
1314 cron : " 0 0 7 * * 7"
1415 working_dir : bots/gsc-report
15- run : ENV_FILE=~/run/discord-bots/gsc-report.env ./run.sh
16+ run : ./run.sh
17+ env_file : ~/run/discord-bots/gsc-report.env
1618
1719 asakatsu-bot-ask :
1820 schedule :
1921 cron : " 0 19 * * *"
2022 working_dir : bots/asakatsu-bot
21- run : ENV_FILE=~/run/discord-bots/asakatsu-bot.env ./run.sh ask
23+ run : ./run.sh ask
24+ env_file : ~/run/discord-bots/asakatsu-bot.env
2225
2326 asakatsu-bot-check :
2427 schedule :
2528 cron : " 0 8 * * *"
2629 working_dir : bots/asakatsu-bot
27- run : ENV_FILE=~/run/discord-bots/asakatsu-bot.env ./run.sh check
30+ run : ./run.sh check
31+ env_file : ~/run/discord-bots/asakatsu-bot.env
You can’t perform that action at this time.
0 commit comments