repo: add CI mode
This commit is contained in:
parent
d529384f21
commit
be1b93cf1f
|
@ -4,7 +4,7 @@ RUN apt-get update && apt-get install -y unzip autoconf build-essential libssl-d
|
||||||
ln -sf /bin/bash /bin/sh && \
|
ln -sf /bin/bash /bin/sh && \
|
||||||
rm -rf /var/lib/apt/lists/*
|
rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
ADD *.sh /
|
ADD entrypoint.sh mkindex.sh /
|
||||||
|
|
||||||
ENTRYPOINT ["bash","/entrypoint.sh"]
|
ENTRYPOINT ["bash","/entrypoint.sh"]
|
||||||
CMD ["--no-build"]
|
CMD ["--no-build"]
|
||||||
|
|
|
@ -1,7 +0,0 @@
|
||||||
# Piston Filesystem Repo Builder
|
|
||||||
|
|
||||||
This is just a simple POC for a repository tool to run locally.
|
|
||||||
|
|
||||||
This only demonstrates building an unsigned python-3.9.1 package, however if it finds an `asc` file it will include it as the signature.
|
|
||||||
|
|
||||||
Mount this whole directory into `/repo` in your API container if you wish to use it.
|
|
|
@ -3,16 +3,27 @@ cd /piston/packages
|
||||||
SERVER=1
|
SERVER=1
|
||||||
BUILD=1
|
BUILD=1
|
||||||
|
|
||||||
|
ls -la /piston /piston/*
|
||||||
|
|
||||||
echo "Running through arguments.."
|
echo "Running through arguments.."
|
||||||
|
|
||||||
for pkg in "$@"
|
for pkg in "$@"
|
||||||
do
|
do
|
||||||
|
shift
|
||||||
if [[ "$pkg" = "--no-server" ]]; then
|
if [[ "$pkg" = "--no-server" ]]; then
|
||||||
echo "Not starting index server after builds"
|
echo "Not starting index server after builds"
|
||||||
SERVER=0
|
SERVER=0
|
||||||
elif [[ "$pkg" = "--no-build" ]]; then
|
elif [[ "$pkg" = "--no-build" ]]; then
|
||||||
echo "Building no more package"
|
echo "Building no more package"
|
||||||
BUILD=0
|
BUILD=0
|
||||||
|
elif [[ "$pkg" = "--ci" ]]; then
|
||||||
|
echo "Running in CI mode, --no-build, --no-server"
|
||||||
|
BUILD=0
|
||||||
|
SERVER=0
|
||||||
|
for package in "$(git diff-tree --no-commit-id --name-only -r $1 | awk -F/ '{ print $2 "-" $3 }' | sort -u)"; do
|
||||||
|
make -j16 $package.pkg.tar.gz
|
||||||
|
done
|
||||||
|
|
||||||
else
|
else
|
||||||
if [[ $BUILD -eq 1 ]]; then
|
if [[ $BUILD -eq 1 ]]; then
|
||||||
echo "Building package $pkg"
|
echo "Building package $pkg"
|
||||||
|
|
Loading…
Reference in New Issue