Skip to content

Commit

Permalink
ci: fix extension name on unix-like system (TabbyML#2471)
Browse files Browse the repository at this point in the history
  • Loading branch information
wsxiaoys authored Jun 21, 2024
1 parent 2a38ced commit 1613bc9
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -257,14 +257,21 @@ jobs:

- name: Creating distribution bundles
run: >
get_file_extension() {
local filename="$1"
# Check if the file has an extension
if [[ "$filename" == *.* && ! "$filename" == .* ]]; then
echo ".${filename##*.}"
else
echo ""
fi
}
for llama_server in llama-server_*/llama-server_*; do
for tabby in tabby_*/tabby_*; do
llamab=$(basename $llama_server)
tabbyb=$(basename $tabby)
extname=${tabbyb##*.}
if [[ -n "${extname}" ]]; then
extname=.${extname}
fi
extname=$(get_file_extension $tabbyb)
llaman=${llamab%.*}
tabbyn=${tabbyb%.*}
Expand Down

0 comments on commit 1613bc9

Please sign in to comment.