Skip to content
This repository was archived by the owner on Jun 17, 2024. It is now read-only.

Commit 0f9c7d1

Browse files
committed
store urls in binaries
1 parent 553b435 commit 0f9c7d1

File tree

2 files changed

+18
-5
lines changed

2 files changed

+18
-5
lines changed

template.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"binaries-url": "https://github.com/gdlocalisation/gdl-binaries/releases/latest/download/gdl-binaries.bin.gzip",
3+
"settings-url": "https://www.gdlocalisation.uk/",
4+
"site-url": "https://www.gdlocalisation.uk/",
5+
"github-url": "https://github.com/gdlocalisation/",
6+
"discord-url": "https://discord.gg/CScsGU3N6M"
7+
}

win/make_release.py

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,14 @@ def __init__(self) -> None:
1212
self.assets_dir = self.parent_cwd.joinpath('gdl-assets')
1313
if not self.assets_dir.is_dir():
1414
raise FileNotFoundError(
15-
f'Could not find gdl-assets at {self.assets_dir}')
15+
f'Could not find gdl-assets at {self.assets_dir}'
16+
)
1617
if self.out_dir.is_dir():
1718
shutil.rmtree(self.out_dir)
1819
self.out_dir.mkdir()
19-
self.ball_json = {}
20+
self.ball_json = json.loads(open(
21+
self.parent_cwd.joinpath('template.json'), 'r', encoding='utf-8'
22+
).read())
2023
self.ball = b''
2124
self.append_gdl_assets()
2225
self.append_gdl_binaries()
@@ -72,11 +75,14 @@ def write_out(self) -> None:
7275

7376
def print_stats(self, compressed: bytes) -> None:
7477
print(
75-
f'Uncompressed size: {round(len(self.ball) / 1024 / 1024 * 100) / 100}MB')
78+
f'Uncompressed size: {round(len(self.ball) / 1024 / 1024 * 100) / 100}MB'
79+
)
7680
print(
77-
f'Compressed size: {round(len(compressed) / 1024 / 1024 * 100) / 100}MB')
81+
f'Compressed size: {round(len(compressed) / 1024 / 1024 * 100) / 100}MB'
82+
)
7883
print(
79-
f'[{round(len(compressed) / len(self.ball) * 100)}% of 100%] or', end=' ')
84+
f'[{round(len(compressed) / len(self.ball) * 100)}% of 100%] or', end=' '
85+
)
8086
print(f'[100% of {round(len(self.ball) / len(compressed) * 100)}%]')
8187

8288

0 commit comments

Comments
 (0)