From 3cbe33b44ba63770aedc1b0305f942bfbd623859 Mon Sep 17 00:00:00 2001 From: Bernhard Manfred Gruber Date: Fri, 17 Jun 2022 15:10:00 +0200 Subject: [PATCH] Fix uploading single-header llama.hpp --- .github/workflows/single-header.yml | 4 ++++ tools/create-single-header.sh | 5 +++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/.github/workflows/single-header.yml b/.github/workflows/single-header.yml index 8090af0f5b..0e9758fc08 100644 --- a/.github/workflows/single-header.yml +++ b/.github/workflows/single-header.yml @@ -9,11 +9,15 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 + - name: clone single-header + run: | + git clone -b single-header https://x-access-token:${{secrets.github_token}}@github.com/${{github.repository}}.git single-header - name: create-single-header.sh run: | ./tools/create-single-header.sh - name: commit run: | + cd single-header git config --global user.email "action@github.com" git config --global user.name "GitHub Action" git add llama.hpp diff --git a/tools/create-single-header.sh b/tools/create-single-header.sh index f6fe2a0540..9ef6cd8b45 100755 --- a/tools/create-single-header.sh +++ b/tools/create-single-header.sh @@ -2,11 +2,12 @@ workingcopy_dir="$( cd -- "$( dirname -- "${BASH_SOURCE[0]:-$0}"; )" &> /dev/null && pwd 2> /dev/null; )/.." amalgamate_tmp_dir=$workingcopy_dir/_amalgamate_tmp -destination_dir=$workingcopy_dir/single_header +destination_dir=$workingcopy_dir/single-header git clone https://github.com/shrpnsld/amalgamate.git --depth 1 $amalgamate_tmp_dir/clone cd include/llama $amalgamate_tmp_dir/clone/amalgamate -o $amalgamate_tmp_dir -H -v -a -n 'llama' cd ../.. -mv $amalgamate_tmp_dir/llama-amalgamated/llama.hpp $workingcopy_dir +mkdir -p $destination_dir +mv $amalgamate_tmp_dir/llama-amalgamated/llama.hpp $destination_dir rm -rf $amalgamate_tmp_dir