Skip to content

Commit

Permalink
Merge pull request #73 from kloptops/main
Browse files Browse the repository at this point in the history
tools/build_release.py: fixed bug with not sanitizing port.json['name']
  • Loading branch information
kloptops authored Feb 10, 2024
2 parents 6480a2a + ef0bc5f commit 16c46ac
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 4 deletions.
4 changes: 4 additions & 0 deletions tools/build_release.py
Original file line number Diff line number Diff line change
Expand Up @@ -238,6 +238,10 @@ def load_port(port_dir, manifest, registered, port_status, quick_build=False):
error(port_dir.name, f"Bad port directory {dir_name[:-1]!r}, recommended name is {name_cleaner(dir_name[:-1])!r}")
broken = True

else:
# Another bug :D
port_data['port_json']['name'] = name_cleaner(port_data['port_json']['name'])

# This is an abomination. :D
if (port_check_bf & (1<<PORT_JSON)) == 0:
port_json_files = list(port_dir.glob('**/*.port.json'))
Expand Down
15 changes: 11 additions & 4 deletions tools/prepare_repo.sh
Original file line number Diff line number Diff line change
@@ -1,12 +1,19 @@
#!/bin/bash

if [ ! -f "SOURCE_SETUP.txt" ]; then
echo "run in root directory as tools/prepare_repo.sh"
exit 255
fi

source SOURCE_SETUP.txt

cd releases/
rm -f *.json
rm -f images.zip
wget "https://github.com/PortsMaster/PortMaster-New/releases/latest/download/ports.json"
wget "https://github.com/PortsMaster/PortMaster-New/releases/latest/download/ports_status.json"
wget "https://github.com/PortsMaster/PortMaster-New/releases/latest/download/manifest.json"
wget "https://github.com/PortsMaster/PortMaster-New/releases/latest/download/images.zip"
wget "https://github.com/${RELEASE_ORG}/${RELEASE_REPO}/releases/latest/download/ports.json"
wget "https://github.com/${RELEASE_ORG}/${RELEASE_REPO}/releases/latest/download/ports_status.json"
wget "https://github.com/${RELEASE_ORG}/${RELEASE_REPO}/releases/latest/download/manifest.json"
wget "https://github.com/${RELEASE_ORG}/${RELEASE_REPO}/releases/latest/download/images.zip"
cd ..

python3 tools/build_data.py

0 comments on commit 16c46ac

Please sign in to comment.