Files
gitlab-ci-local/publish-deb
Mads Jon Nielsen 1dc697c8fb
Some checks failed
build / yamllint (push) Has been cancelled
build / smoke-test (push) Has been cancelled
build / eslint (push) Has been cancelled
build / unused-deps (push) Has been cancelled
build / jest (push) Has been cancelled
build / CodeQL (push) Has been cancelled
Do not generate zip file in publish-dev shell script
2025-06-20 12:23:13 +02:00

40 lines
1.3 KiB
Bash
Executable File

#!/bin/bash
set -e
VERSION=$(jq -r ".version" < package.json)
DESCRIPTION=$(jq -r ".description" < package.json)
rm -rf "bin/gitlab-ci-local_${VERSION}_amd64"
mkdir -p ppa
# Generate package info file
mkdir -p "bin/gitlab-ci-local_${VERSION}_amd64/DEBIAN/"
cat << EOF > "bin/gitlab-ci-local_${VERSION}_amd64/DEBIAN/control"
Name: gitlab-ci-local
Package: gitlab-ci-local
Version: ${VERSION}
Architecture: amd64
Author: Mads Jon Nielsen <madsjon@gmail.com>
Maintainer: Mads Jon Nielsen <madsjon@gmail.com>
Description: ${DESCRIPTION}
Homepage: https://github.com/firecow/gitlab-ci-local
Website: https://github.com/firecow/gitlab-ci-local
Depends: rsync
EOF
mkdir -p "bin/gitlab-ci-local_${VERSION}_amd64/usr/local/bin/"
cp bin/linux/gitlab-ci-local "bin/gitlab-ci-local_${VERSION}_amd64/usr/local/bin/"
(cd bin/ && (dpkg-deb --root-owner-group --build "gitlab-ci-local_${VERSION}_amd64" || rm "bin/gitlab-ci-local_${VERSION}_amd64.deb"))
mv "bin/gitlab-ci-local_${VERSION}_amd64.deb" "ppa/"
# Packages & Packages.gz
(cd ppa && dpkg-scanpackages --multiversion . > Packages)
(cd ppa && gzip -k -f Packages)
# Release, Release.gpg & InRelease
(cd ppa && apt-ftparchive release . > Release)
(cd ppa && gpg --default-key "madsjon@gmail.com" -abs -o - Release > Release.gpg)
(cd ppa && gpg --default-key "madsjon@gmail.com" --clearsign -o - Release > InRelease)