11#!/usr/bin/env python3
22#
3- # InspIRCd -- Internet Relay Chat Daemon
4- #
5- # Copyright (C) 2022 Sadie Powell <sadie@witchery.services>
6- #
7- # This file is part of InspIRCd. InspIRCd is free software: you can
8- # redistribute it and/or modify it under the terms of the GNU General Public
9- # License as published by the Free Software Foundation, version 2.
10- #
11- # This program is distributed in the hope that it will be useful, but WITHOUT
12- # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
13- # FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
14- # details.
15- #
16- # You should have received a copy of the GNU General Public License
17- # along with this program. If not, see <http://www.gnu.org/licenses/>.
18- #
19-
3+ # Anope IRC Services <https://www.anope.org/>
4+ # SPDX-License-Identifier: GPL-2.0-only
205
216import datetime
227import os
@@ -32,14 +17,14 @@ CC_BOLD = "\x1B[1m" if sys.stdout.isatty() else ''
3217CC_RED = "\x1B [1;31m" if sys .stdout .isatty () else ''
3318CC_RESET = "\x1B [0m" if sys .stdout .isatty () else ''
3419
35- # INSPIRCD_BRANCHES contains a space-delimited list of git branch names.
36- INSPIRCD_BRANCHES = os .getenv ('INSPIRCD_BRANCHES ' , 'master ' ).split ()
20+ # ANOPE_BRANCHES contains a space-delimited list of git branch names.
21+ ANOPE_BRANCHES = os .getenv ('ANOPE_BRANCHES ' , '2.1 ' ).split ()
3722
38- # INSPIRCD_REPOSITORY contains the location of the InspIRCd git repository.
39- INSPIRCD_REPOSITORY = os .getenv ('INSPIRCD_REPOSITORY ' , 'https://github.com/inspircd/inspircd .git' )
23+ # ANOPE_REPOSITORY contains the location of the Anope git repository.
24+ ANOPE_REPOSITORY = os .getenv ('ANOPE_REPOSITORY ' , 'https://github.com/anope/anope .git' )
4025
41- # INSPIRCD_TAGS contains a space-delimited list of git tag prefixes.
42- INSPIRCD_TAGS = os .getenv ('INSPIRCD_TAGS ' , '' ).split ()
26+ # ANOPE_TAGS contains a space-delimited list of git tag prefixes.
27+ ANOPE_TAGS = os .getenv ('ANOPE_TAGS ' , '' ).split ()
4328
4429def error (message ):
4530 print (f"{ CC_RED } Error:{ CC_RESET } { message } !" , file = sys .stderr )
@@ -62,17 +47,17 @@ for file in os.listdir(SITE_DIR):
6247
6348docs = {}
6449with tempfile .TemporaryDirectory () as git :
65- print (f"Cloning { CC_BOLD } { INSPIRCD_REPOSITORY } { CC_RESET } to { git } ..." )
66- if subprocess .call ([GIT , 'clone' , INSPIRCD_REPOSITORY , git ]):
50+ print (f"Cloning { CC_BOLD } { ANOPE_REPOSITORY } { CC_RESET } to { git } ..." )
51+ if subprocess .call ([GIT , 'clone' , ANOPE_REPOSITORY , git ]):
6752 sys .exit (1 )
6853 os .chdir (git )
6954
7055 # Build the list of refs to build docs for.
7156 references = {}
72- for branch in INSPIRCD_BRANCHES :
57+ for branch in ANOPE_BRANCHES :
7358 references [branch ] = [branch ]
7459 for tag in subprocess .check_output ([GIT , 'tag' , '--list' , '--sort' , '-v:refname' ], encoding = 'utf-8' ).split ('\n ' ):
75- for tag_prefix in INSPIRCD_TAGS :
60+ for tag_prefix in ANOPE_TAGS :
7661 if tag .startswith (tag_prefix ):
7762 versions = re .match (r'^v((((\d+)\.\d+)\.\d+).*)' , tag )
7863 if not versions :
0 commit comments