mirror of
https://github.com/gentoo-mirror/guru.git
synced 2026-07-22 05:23:01 -04:00
.github/workflows/repoman.yml: Use script to auto run the latest rm
By using a seperate script instead of running everything in the yml file, we gain the ability to use and manipulate variables. This means that we can now automatically run the latest version of repoman, which should make this more hands-off by removing the need to update this every now and then. Signed-off-by: Andrew Ammerlaan <andrewammerlaan@riseup.net>
This commit is contained in:
30
scripts/setup-and-run-repoman.sh
Executable file
30
scripts/setup-and-run-repoman.sh
Executable file
@@ -0,0 +1,30 @@
|
||||
#! /usr/bin/env bash
|
||||
# Maintainer: Andrew Ammerlaan <andrewammerlaan@riseup.net>
|
||||
#
|
||||
# This sets up repoman and runs the latest version
|
||||
#
|
||||
# TODO: Force repoman to output in colour
|
||||
|
||||
### Setup prerequisites
|
||||
python3 -m pip install --upgrade pip
|
||||
pip install lxml pyyaml
|
||||
sudo groupadd -g 250 portage
|
||||
sudo useradd -g portage -d /var/tmp/portage -s /bin/false -u 250 portage
|
||||
|
||||
### Sync the portage repository
|
||||
git clone https://github.com/gentoo/portage.git
|
||||
cd portage
|
||||
|
||||
# Get all versions, and read into array
|
||||
mapfile -t RM_VERSIONS < <( git tag | grep repoman | sort -u )
|
||||
|
||||
# Select latests version (last element in array)
|
||||
RM_VERS="${RM_VERSIONS[-1]}"
|
||||
|
||||
# Checkout this version
|
||||
git checkout tags/${RM_VERS} -b ${RM_VERS}
|
||||
|
||||
cd ..
|
||||
|
||||
### Run repoman
|
||||
python3 portage/repoman/bin/repoman -dx full
|
||||
Reference in New Issue
Block a user