add a tag override for testing

This commit is contained in:
Luke Francl 2021-10-08 14:39:00 -07:00
parent 202ca6a675
commit 73a29fd324

View File

@ -1,5 +1,11 @@
name: Sync Linguist
on: workflow_dispatch
on:
workflow_dispatch:
inputs:
linguist_tag:
description: 'Linguist tag override'
required: False
default: ''
jobs:
sync-linguist:
@ -28,10 +34,16 @@ jobs:
set -euo pipefail
IFS=$'\n\t'
cd .linguist
latest=$(git tag --list | \
grep -v "-" | \
sort --version-sort --reverse | \
head -1)
if [[ -n "${{ github.event.inputs.linguist_tag }}" ]]; then
echo "Using tag override '${{ github.event.inputs.linguist_tag }}'"
latest="${{ github.event.inputs.linguist_tag }}"
else
latest=$(git tag --list | \
grep -v "-" | \
sort --version-sort --reverse | \
head -1)
fi
if [[ -z $latest ]]; then
echo "could not determine latest Linguist version"
exit 1