Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
vbem committed Oct 2, 2023
1 parent 04fb363 commit 2ae1261
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions mr.bash
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,10 @@ declare -rg MR_RELEASE_URL
declare -rg MR_GIHUB_API_BASEURL="${MR_GIHUB_API_BASEURL:-https://api.github.com}"
# baseurl of GitHub service, defaults to https://github.com
declare -rg MR_GIHUB_BASEURL="${MR_GIHUB_BASEURL:-https://github.com}"
# baseurl of GitHub service, defaults to https://github.com
# runners' local username prefix, defaults to `runner-`
declare -rg MR_USER_PREFIX="${MR_USER_PREFIX:-runner-}"
# URL of this application
declare -rg MR_URL='https://github.com/vbem/multi-runners'

# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# stdlib
Expand Down Expand Up @@ -214,7 +216,7 @@ function mr::addRunner {

local name="$user@$HOSTNAME"

local labels="controller:$USER@$HOSTNAME:$DIR_THIS/$FILE_THIS"
local labels="controller:${MR_URL#https://},username:$user,hostname:$HOSTNAME"
[[ -r /etc/os-release ]] && labels="$labels,os:$(source /etc/os-release && echo $ID-$VERSION_ID)"
[[ -n "$repo" ]] && labels="$labels,$org/$repo" || labels="$labels,$org"
[[ -n "$extraLabels" ]] && labels="$labels,$extraLabels"
Expand Down Expand Up @@ -285,7 +287,7 @@ function mr::test {
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# main

HELP="$FILE_THIS - https://github.com/vbem/multi-runners
HELP="$FILE_THIS - $MR_URL
Environment variables:
MR_GIHUB_BASEURL=$MR_GIHUB_BASEURL
Expand Down

0 comments on commit 2ae1261

Please sign in to comment.