Philipp Hörist pushed to branch master at gajim / gajim
Commits:
f605d77e by lovetox at 2022-03-27T18:14:04+02:00
ci: Simplify docker image
Every RUN command creates an image layer, so combining the invocations
results in less layers
- - - - -
ba31782c by lovetox at 2022-03-27T18:18:30+02:00
other: Update git update hook
Fix syntax errors, this needs to run with python 3.7
- - - - -
2 changed files:
- .githooks/update
- docker/Dockerfile
Changes:
=====================================
.githooks/update
=====================================
@@ -1,5 +1,10 @@
#!/usr/bin/env python
+from __future__ import annotations
+
+from typing import List
+from typing import Tuple
+
import sys
import subprocess
@@ -7,7 +12,7 @@ import subprocess
ALLOWED_TAGS = ['ci', 'feat', 'fix', 'perf', 'refactor', 'chore', 'other']
-def parse_args() -> tuple[str, str]:
+def parse_args() -> Tuple[str, str]:
old_ref = sys.argv[2]
new_ref = sys.argv[3]
return old_ref, new_ref
@@ -19,7 +24,7 @@ def get_commit_subject(sha: str) -> str:
return data.decode()
-def get_commit_shas(start_ref: str, end_ref: str) -> list[str]:
+def get_commit_shas(start_ref: str, end_ref: str) -> List[str]:
arg = f'{start_ref}..{end_ref}'
data = subprocess.check_output(['git', 'rev-list', arg])
text = data.decode()
@@ -38,7 +43,7 @@ def enforce_message_rules(subject: str) -> None:
sys.exit(1)
-def main(args: tuple[str, str]) -> None:
+def main(args: Tuple[str, str]) -> None:
shas = get_commit_shas(*args)
for sha in shas:
subject = get_commit_subject(sha)
=====================================
docker/Dockerfile
=====================================
@@ -2,25 +2,23 @@ FROM python:3.9
ARG DEBIAN_FRONTEND=noninteractive
-RUN apt-get update
-RUN apt-get install -y apt-utils
-RUN apt-get install -y appstream-util
-RUN apt-get install -y libgirepository1.0-dev
-RUN apt-get install -y gir1.2-gtk-3.0
-RUN apt-get install -y gir1.2-soup-2.4
-RUN apt-get install -y gir1.2-ayatanaappindicator3-0.1
-RUN apt-get install -y gettext
-RUN apt-get install -y nodejs
-RUN apt-get install -y npm
+RUN apt-get update && apt-get install -y \
+ apt-utils \
+ appstream-util \
+ libgirepository1.0-dev \
+ gir1.2-gtk-3.0 \
+ gir1.2-soup-2.4 \
+ gir1.2-ayatanaappindicator3-0.1 \
+ gettext \
+ nodejs \
+ npm \
+ && adduser --disabled-password worker
-RUN adduser --disabled-password worker
WORKDIR /home/worker
ENV PATH="/home/worker/.local/bin:${PATH}"
USER worker
-RUN pip install --upgrade pip
-
COPY --chown=worker:worker requirements.txt requirements.txt
-RUN pip install --no-cache-dir --user -r requirements.txt
+RUN pip install --upgrade pip && pip install --no-cache-dir --user -r
requirements.txt
CMD bash
View it on GitLab:
https://dev.gajim.org/gajim/gajim/-/compare/ff1f7cbbe2109a24c56546af3fcc945789c798c3...ba31782c7582fe67fb6c3db32ddc50fb7d7a3aac
--
View it on GitLab:
https://dev.gajim.org/gajim/gajim/-/compare/ff1f7cbbe2109a24c56546af3fcc945789c798c3...ba31782c7582fe67fb6c3db32ddc50fb7d7a3aac
You're receiving this email because of your account on dev.gajim.org.
_______________________________________________
Commits mailing list
[email protected]
https://lists.gajim.org/cgi-bin/listinfo/commits