From 39c5e644062780cf764cae10bf7f0494d50147ca Mon Sep 17 00:00:00 2001 From: David Baker Date: Fri, 13 Dec 2019 16:14:33 +0000 Subject: [PATCH] Bundle deb into a repo --- package.json | 1 + scripts/mkrepo.sh | 33 +++++++++++++++++++++++++++++++++ 2 files changed, 34 insertions(+) create mode 100755 scripts/mkrepo.sh diff --git a/package.json b/package.json index 3f9f26c..c28c794 100644 --- a/package.json +++ b/package.json @@ -21,6 +21,7 @@ "indocker": "scripts/indocker.sh", "docker:build": "yarn run indocker yarn run build", "docker:install": "yarn run indocker yarn install", + "debrepo": "scripts/mkrepo.sh", "clean": "rimraf webapp.asar dist packages deploys" }, "dependencies": { diff --git a/scripts/mkrepo.sh b/scripts/mkrepo.sh new file mode 100755 index 0000000..ad16b55 --- /dev/null +++ b/scripts/mkrepo.sh @@ -0,0 +1,33 @@ +#!/bin/sh + +# Take the deb and bundle it into a apt repository +if [[ $# -lt 1 ]] +then + echo "Usage $0 " + exit +fi + +confdir=$1 + +set -x +set -e + +ver=`node -e "require('fs'); console.log(JSON.parse(fs.readFileSync('package.json')).version)"` +distdir=$PWD/dist +confdir=$PWD/$confdir + +repodir=`mktemp -d -t repo` +mkdir $repodir/conf +cp $confdir/conf_distributions $repodir/conf/distributions + +pushd $repodir +for i in `cat conf/distributions | grep Codename | cut -d ' ' -f 2` +do + reprepro includedeb $i $distdir/riot-desktop_${ver}_amd64.deb +done + +tar cvzf $distdir/riot-desktop_repo_$ver.tar.gz . + +popd + +rm -r $repodir