Initial commit
This commit is contained in:
commit
affb2b1822
10 changed files with 93 additions and 0 deletions
3
README.org
Normal file
3
README.org
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
#+title: Build Scripts
|
||||||
|
|
||||||
|
This is my repository of build scripts for my Laminar setup.
|
0
contexts/.gitkeep
Normal file
0
contexts/.gitkeep
Normal file
5
jobs/build-cgit-pygments-wrapper.run
Executable file
5
jobs/build-cgit-pygments-wrapper.run
Executable file
|
@ -0,0 +1,5 @@
|
||||||
|
#!/bin/bash -ex
|
||||||
|
git clone --depth 1 git://ryuslash.org/cgit-pygments-wrapper.git .
|
||||||
|
makepkg --clean
|
||||||
|
mv cgit-pygments-wrapper-*-any.pkg.tar.zst "${ARCHIVE}/"
|
||||||
|
repo-add /home/slash/public_html/repo/x86_64/ryuslash.db.tar.gz "${ARCHIVE}"/cgit-pygments-wrapper-*-any.pkg.tar.zst
|
5
jobs/build-decker.run
Executable file
5
jobs/build-decker.run
Executable file
|
@ -0,0 +1,5 @@
|
||||||
|
#!/bin/bash -ex
|
||||||
|
git clone --depth 1 git://ryuslash.org/pkgbuilds/decker.git .
|
||||||
|
makepkg --clean
|
||||||
|
mv decker-*-x86_64.pkg.tar.zst "${ARCHIVE}/"
|
||||||
|
repo-add /home/slash/public_html/repo/x86_64/ryuslash.db.tar.gz "${ARCHIVE}"/decker-*-x86_64.pkg.tar.zst
|
18
jobs/build-nroam.run
Executable file
18
jobs/build-nroam.run
Executable file
|
@ -0,0 +1,18 @@
|
||||||
|
#!/bin/bash -ex
|
||||||
|
git clone --depth 1 git://ryuslash.org/aliens/nroam.git .
|
||||||
|
|
||||||
|
# Prepare package
|
||||||
|
version=$(date +%Y%m%d.%-H%M)
|
||||||
|
dist="nroam-${version}"
|
||||||
|
mkdir $dist
|
||||||
|
cp *.el $dist
|
||||||
|
|
||||||
|
## Update version number
|
||||||
|
pushd $dist
|
||||||
|
sed -i "s/\\(;; Version: \\).*/\\1${version}/" *.el
|
||||||
|
echo "(define-package \"nroam\" \"${version}\" \"Org-roam backlinks within org-mode buffers\" '((emacs \"26.1\") (org-roam \"1.2.3\") (org \"9.4.4\"))" \
|
||||||
|
> nroam-pkg.el
|
||||||
|
popd
|
||||||
|
|
||||||
|
tar cf $dist.tar $dist/
|
||||||
|
mv $dist.tar "${ARCHIVE}/"
|
45
jobs/freeloadio.run
Executable file
45
jobs/freeloadio.run
Executable file
|
@ -0,0 +1,45 @@
|
||||||
|
#!/usr/bin/env python
|
||||||
|
|
||||||
|
from os import getenv
|
||||||
|
from os.path import dirname
|
||||||
|
from re import match
|
||||||
|
from shlex import quote
|
||||||
|
from subprocess import run
|
||||||
|
|
||||||
|
commit_before_sha = getenv("CI_COMMIT_BEFORE_SHA")
|
||||||
|
commit_sha = getenv("CI_COMMIT_SHA")
|
||||||
|
commit_ref_name = getenv("CI_COMMIT_REF_NAME")
|
||||||
|
directories = set()
|
||||||
|
dockerfile_updated = False
|
||||||
|
|
||||||
|
cmd = "git clone https://code.ryuslash.org/ryuslash/git-lfs-test.git ."
|
||||||
|
print(cmd)
|
||||||
|
run(cmd, shell=True)
|
||||||
|
|
||||||
|
cmd = "docker images ryuslash.org/freeloadio"
|
||||||
|
print(cmd)
|
||||||
|
process = run(cmd, shell=True, capture_output=True)
|
||||||
|
process_output = process.stdout.decode()
|
||||||
|
|
||||||
|
if len(process_output.strip().split("\n")) == 1:
|
||||||
|
# We don't have any docker file at all yet.
|
||||||
|
dockerfile_updated = True
|
||||||
|
|
||||||
|
if not match(r"^0+$", commit_before_sha):
|
||||||
|
cmd = f"git diff --name-only {quote(commit_before_sha)} {quote(commit_sha)}"
|
||||||
|
print(cmd)
|
||||||
|
process = run(cmd, shell=True, capture_output=True)
|
||||||
|
process_output = process.stdout.decode()
|
||||||
|
print(process_output)
|
||||||
|
for filename in process_output.strip().split("\n"):
|
||||||
|
if filename == "Dockerfile":
|
||||||
|
dockerfile_updated = True
|
||||||
|
directories.add(dirname(filename))
|
||||||
|
|
||||||
|
if dockerfile_updated:
|
||||||
|
cmd = "docker build -t ryuslash.org/freeloadio:latest ."
|
||||||
|
print(cmd)
|
||||||
|
run(cmd, shell=True)
|
||||||
|
|
||||||
|
unix_directory_list = str.join(":", directories)
|
||||||
|
print(f"python tasks.py probe --directories={quote(unix_directory_list)}")
|
10
jobs/guile-inkplate.run
Executable file
10
jobs/guile-inkplate.run
Executable file
|
@ -0,0 +1,10 @@
|
||||||
|
#!/bin/bash -ex
|
||||||
|
git clone --depth 1 https://code.ryuslash.org/ryuslash/guile-inkplate.git .
|
||||||
|
guix shell -D --file=guix.scm <<EOF
|
||||||
|
set -o errexit
|
||||||
|
autoreconf -ivf
|
||||||
|
./configure
|
||||||
|
make dist
|
||||||
|
exit
|
||||||
|
EOF
|
||||||
|
mv guile-inkplate-*.tar.gz "${ARCHIVE}/"
|
2
jobs/update-mirrors-deploy.run
Executable file
2
jobs/update-mirrors-deploy.run
Executable file
|
@ -0,0 +1,2 @@
|
||||||
|
#!/bin/bash -ex
|
||||||
|
repo-add /home/slash/public_html/repo/x86_64/ryuslash.db.tar.gz "$BUILD/"*.pkg.tar.zst
|
5
jobs/update-mirrors.run
Executable file
5
jobs/update-mirrors.run
Executable file
|
@ -0,0 +1,5 @@
|
||||||
|
#!/bin/bash -ex
|
||||||
|
git clone --depth 1 https://code.ryuslash.org/ryuslash/update-mirrors.git .
|
||||||
|
makepkg --clean
|
||||||
|
mv update-mirrors-*-any.pkg.tar.zst "${ARCHIVE}/"
|
||||||
|
laminarc queue update-mirrors-deploy BUILD="$ARCHIVE"
|
0
scripts/.gitkeep
Normal file
0
scripts/.gitkeep
Normal file
Loading…
Reference in a new issue