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