Skip to content

Commit 4a0cf55

Browse files
committed
Update for building the Anope API docs.
1 parent 5c94abd commit 4a0cf55

6 files changed

Lines changed: 23 additions & 38 deletions

File tree

.github/workflows/build.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ jobs:
1818
container: alpine:edge
1919
runs-on: ubuntu-latest
2020
env:
21-
INSPIRCD_BRANCHES: insp4 master
22-
INSPIRCD_TAGS: v3 v4
21+
ANOPE_BRANCHES: 2.0 2.1
22+
ANOPE_TAGS: 2.0 2.1
2323
environment:
2424
name: github-pages
2525
url: ${{ steps.deployment.outputs.page_url }}

.github/workflows/check.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ jobs:
99
runs-on: ubuntu-latest
1010
if: github.ref != 'refs/heads/master'
1111
env:
12-
INSPIRCD_BRANCHES: insp3 insp4 master
13-
INSPIRCD_TAGS: v3 v4
12+
ANOPE_BRANCHES: 2.0 2.1
13+
ANOPE_TAGS: 2.1
1414
steps:
1515
- uses: actions/checkout@v6
1616

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
## About
22

3-
InspIRCd is a modular C++ Internet Relay Chat (IRC) server for UNIX-like and Windows systems.
3+
Anope is an open source set of IRC Services.
44

5-
This repository contains the sources for the API documentation available at [api.inspircd.org](https://api.inspircd.org).
5+
This repository contains the sources for the API documentation available at [api.anope.org](https://api.anope.org).
66

77
## License
88

9-
This API documentation is licensed under the same license as InspIRCd (GPLv2).
9+
This API documentation is licensed under the same license as Anope (GPLv2).

index.html.j2

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<!DOCTYPE html>
22
<html>
33
<head>
4-
<title>InspIRCd API Documentation</title>
4+
<title>Anope API Documentation</title>
55
<meta charset="utf-8">
66
<style type="text/css">
77
body {
@@ -19,7 +19,7 @@
1919
</style>
2020
</head>
2121
<body>
22-
<h1>InspIRCd API Documentation</h1>
22+
<h1>Anope API Documentation</h1>
2323
{%- for version, directories in docs.items() %}
2424
<h2>{{ version }}</h2>
2525
<ul>
@@ -28,6 +28,6 @@
2828
{%- endfor %}
2929
</ul>
3030
{%- endfor %}
31-
<footer>Documentation generated at {{ time }} using the <a href="https://github.com/inspircd/api-docs">InspIRCd API Documentation Builder</a>.</footer>
31+
<footer>Documentation generated at {{ time }} using the <a href="https://github.com/anope/api-docs">Anope API Documentation Builder</a>.</footer>
3232
</body>
3333
</html>

mkapi

Lines changed: 12 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,7 @@
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

216
import datetime
227
import os
@@ -32,14 +17,14 @@ CC_BOLD = "\x1B[1m" if sys.stdout.isatty() else ''
3217
CC_RED = "\x1B[1;31m" if sys.stdout.isatty() else ''
3318
CC_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

4429
def 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

6348
docs = {}
6449
with 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:

site/CNAME

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
api.inspircd.org
1+
api.anope.org

0 commit comments

Comments
 (0)