Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4b5318c676 |
No files matched your search
@@ -1,5 +1,14 @@
|
|||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
|
## 0.43.1 - 2026-11-24 14:37:02 +0100
|
||||||
|
|
||||||
|
fix: build.py and publish.py print their usage for --help instead of building or publishing.
|
||||||
|
|
||||||
|
- ./build.py --help prints its usage; its other options are still passed to the container
|
||||||
|
runtime's build.
|
||||||
|
- ./publish.py --help prints its usage, and an option it does not know is an error, instead of an
|
||||||
|
upload of the package.
|
||||||
|
|
||||||
## 0.43.0 - 2026-11-24 14:30:50 +0100
|
## 0.43.0 - 2026-11-24 14:30:50 +0100
|
||||||
|
|
||||||
feature: the PKI's schema is a file of its own that another slapd loads, a certificate can carry the
|
feature: the PKI's schema is a file of its own that another slapd loads, a certificate can carry the
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ Docker on Linux. Options are passed to the runtime's build, such as --build-arg
|
|||||||
failure is a message on standard error and a non-zero exit status.
|
failure is a message on standard error and a non-zero exit status.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
import argparse
|
||||||
import os
|
import os
|
||||||
import pathlib
|
import pathlib
|
||||||
import platform
|
import platform
|
||||||
@@ -24,12 +25,16 @@ RUNTIMES = {'Darwin': 'container', 'Linux': 'docker'}
|
|||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
|
parser = argparse.ArgumentParser(description=__doc__.splitlines()[0], allow_abbrev=False,
|
||||||
|
usage='%(prog)s [-h] [CONTAINER BUILD OPTIONS]',
|
||||||
|
epilog="the other options are passed to the container runtime's build")
|
||||||
|
_, options = parser.parse_known_args()
|
||||||
runtime = os.environ.get('CONTAINER_RUNTIME') or RUNTIMES.get(platform.system())
|
runtime = os.environ.get('CONTAINER_RUNTIME') or RUNTIMES.get(platform.system())
|
||||||
if not runtime:
|
if not runtime:
|
||||||
sys.exit(f'build.py: unsupported platform {platform.system()}; set CONTAINER_RUNTIME')
|
sys.exit(f'build.py: unsupported platform {platform.system()}; set CONTAINER_RUNTIME')
|
||||||
OUT.mkdir(exist_ok=True)
|
OUT.mkdir(exist_ok=True)
|
||||||
build = [runtime, 'build', '--build-arg', f'HOST_UID={os.getuid()}', '--build-arg', f'HOST_GID={os.getgid()}',
|
build = [runtime, 'build', '--build-arg', f'HOST_UID={os.getuid()}', '--build-arg', f'HOST_GID={os.getgid()}',
|
||||||
'-t', IMAGE, *sys.argv[1:], '.']
|
'-t', IMAGE, *options, '.']
|
||||||
if subprocess.run(build, cwd=ROOT).returncode != 0:
|
if subprocess.run(build, cwd=ROOT).returncode != 0:
|
||||||
sys.exit('build.py: the image build failed')
|
sys.exit('build.py: the image build failed')
|
||||||
with subprocess.Popen([runtime, 'run', '--rm', IMAGE, 'tar', '-cf', '-', '-C', '/out', '.'], cwd=ROOT,
|
with subprocess.Popen([runtime, 'run', '--rm', IMAGE, 'tar', '-cf', '-', '-C', '/out', '.'], cwd=ROOT,
|
||||||
|
|||||||
@@ -10,6 +10,7 @@ the content of ~/.gitea-packages-token. A distribution that has the version alre
|
|||||||
is skipped. A failure is a message on standard error and the exit status 1.
|
is skipped. A failure is a message on standard error and the exit status 1.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
import argparse
|
||||||
import base64
|
import base64
|
||||||
import os
|
import os
|
||||||
import pathlib
|
import pathlib
|
||||||
@@ -28,6 +29,7 @@ TOKEN_FILE = pathlib.Path.home() / '.gitea-packages-token'
|
|||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
|
argparse.ArgumentParser(description=__doc__.splitlines()[0]).parse_args()
|
||||||
owner = os.environ.get('OWNER') or 'koszewscy'
|
owner = os.environ.get('OWNER') or 'koszewscy'
|
||||||
server = (os.environ.get('SERVER_URL') or 'https://gitea.koszewscy.waw.pl').rstrip('/')
|
server = (os.environ.get('SERVER_URL') or 'https://gitea.koszewscy.waw.pl').rstrip('/')
|
||||||
distributions = (os.environ.get('DISTRIBUTIONS') or 'resolute').split()
|
distributions = (os.environ.get('DISTRIBUTIONS') or 'resolute').split()
|
||||||
|
|||||||
Reference in new issue
Block a user