Skip to content

Commit

Permalink
generate next season
Browse files Browse the repository at this point in the history
  • Loading branch information
SirSaltyy committed Mar 2, 2025
1 parent 898cf07 commit f1420e9
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion backend/scripts/generate-next-season.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { generateNextSeason, insertBots } from 'shared/generate-leagues'

if (require.main === module) {
runScript(async ({ pg }) => {
const newSeason = 22
const newSeason = 23
if ((newSeason as any) <= CURRENT_SEASON) {
console.log('Are you sure you want to generate the current season?')
return
Expand Down
2 changes: 1 addition & 1 deletion backend/scripts/send-leagues-end-of-season.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { sendEndOfSeasonNotificationsAndBonuses } from 'shared/payout-leagues'

if (require.main === module) {
runScript(async ({ pg }) => {
const prevSeason = 21
const prevSeason = 22
if (prevSeason !== CURRENT_SEASON - 1) {
console.log(
'Are you sure you want to send notifications & bonuses for this season?'
Expand Down
1 change: 1 addition & 0 deletions common/src/leagues.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ export type season = (typeof SEASONS)[number]

export const SEASONS = [
1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22,
23,
] as const
export const CURRENT_SEASON = SEASONS[SEASONS.length - 1]

Expand Down

0 comments on commit f1420e9

Please sign in to comment.