mirror of
https://github.com/engineer-man/piston.git
synced 2025-04-22 21:16:29 +02:00
api: lint **everything**
This commit is contained in:
parent
216451d1aa
commit
60c004eea9
22 changed files with 764 additions and 550 deletions
3
repo/.gitignore
vendored
Normal file
3
repo/.gitignore
vendored
Normal file
|
@ -0,0 +1,3 @@
|
|||
*.pkg.tar.gz
|
||||
index.yaml
|
||||
*.key
|
8
repo/Dockerfile
Normal file
8
repo/Dockerfile
Normal file
|
@ -0,0 +1,8 @@
|
|||
FROM alpine:3.13
|
||||
|
||||
RUN apk add --no-cache gnupg jq zlib zlib-dev cmake cmake-doc extra-cmake-modules extra-cmake-modules-doc build-base gcc abuild binutils binutils-doc gcc-doc yq bash coreutils util-linux pciutils usbutils coreutils binutils findutils grep && \
|
||||
ln -sf /bin/bash /bin/sh && \
|
||||
wget https://github.com/mikefarah/yq/releases/download/2.4.1/yq_linux_amd64 -O /usr/bin/yq &&\
|
||||
chmod +x /usr/bin/yq
|
||||
|
||||
CMD [ "bash", "/repo/make.sh" ]
|
3
repo/README.MD
Normal file
3
repo/README.MD
Normal file
|
@ -0,0 +1,3 @@
|
|||
# Piston Filesystem Repo Builder
|
||||
|
||||
This is just a simple POC for a repository tool to run locally.
|
7
repo/make.sh
Normal file
7
repo/make.sh
Normal file
|
@ -0,0 +1,7 @@
|
|||
#!/bin/bash
|
||||
cd /repo
|
||||
cat password.key | gpg --batch --import private.key
|
||||
pushd ../packages/python
|
||||
cat password.key | make sign VERSIONS=3.9.1 && make cleanup
|
||||
popd
|
||||
./mkindex.sh
|
26
repo/mkindex.sh
Executable file
26
repo/mkindex.sh
Executable file
|
@ -0,0 +1,26 @@
|
|||
echo "schema: ppman-repo-1" > index.yaml
|
||||
echo "baseurl: file://$PWD" >> index.yaml
|
||||
echo "keys: []" >> index.yaml
|
||||
echo "packages: []" >> index.yaml
|
||||
|
||||
yq -yi '.keys[0] = "0x107DA02C7AE97B084746564B9F1FD9D87950DB6F"' index.yaml
|
||||
|
||||
i=-1
|
||||
|
||||
for pkg in $(find ../packages -type f -name "*.pkg.tar.gz")
|
||||
do
|
||||
((i=i+1))
|
||||
cp $pkg .
|
||||
PKGFILE=$(basename $pkg)
|
||||
PKGFILENAME=$(echo $PKGFILE | sed 's/\.pkg\.tar\.gz//g')
|
||||
PKGNAME=$(echo $PKGFILENAME | grep -oP '^\K.+(?=-)')
|
||||
PKGVERSION=$(echo $PKGFILENAME | grep -oP '^.+-\K.+')
|
||||
BUILDFILE=https://github.com/engineer-man/piston/tree/v3/packages/python/
|
||||
SIZE=$(tar tzvf $PKGFILE | sed 's/ \+/ /g' | cut -f3 -d' ' | sed '2,$s/^/+ /' | paste -sd' ' | bc)
|
||||
|
||||
tar xzf $PKGFILE pkg-info.json
|
||||
|
||||
yq -yi ".packages[$i] = {} | .packages[$i].signature = \"$(cat ${pkg}.asc)\" | .packages[$i].buildfile = \"$BUILDFILE\" | .packages[$i].size = $SIZE | .packages[$i].download = \"$PKGFILE\" | .packages[$i].dependencies = $(jq .dependencies -r pkg-info.json) | .packages[$i].author = $(jq .author pkg-info.json) | .packages[$i].language =\"$PKGNAME\" | .packages[$i].version = \"$PKGVERSION\" | .packages[$i].checksums = {} | .packages[$i].checksums.sha256 = \"$(sha256sum $PKGFILE | awk '{print $1}')\"" index.yaml
|
||||
|
||||
rm pkg-info.json
|
||||
done
|
Loading…
Add table
Add a link
Reference in a new issue