mirror of
https://github.com/RetroDECK/RetroDECK.git
synced 2025-04-10 19:15:12 +00:00
WORKFLOW: revamped push_flathub_main - fix3 [skip ci]
This commit is contained in:
parent
768d69d7ad
commit
092fa3b135
2
.github/workflows/flathub_push_main.yml
vendored
2
.github/workflows/flathub_push_main.yml
vendored
|
@ -21,4 +21,4 @@ jobs:
|
||||||
env:
|
env:
|
||||||
GIT_NAME: ${{ secrets.GITNAME }}
|
GIT_NAME: ${{ secrets.GITNAME }}
|
||||||
GIT_MAIL: ${{ secrets.GITMAIL }}
|
GIT_MAIL: ${{ secrets.GITMAIL }}
|
||||||
GIT_TOKEN: ${{ secrets.GITTOKEN }}
|
GIT_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
|
@ -17,9 +17,7 @@ if [ -d flathub ]; then
|
||||||
rm -rf flathub
|
rm -rf flathub
|
||||||
fi
|
fi
|
||||||
git clone --depth=1 --recursive "https://github.com/$flathub_target_repo.git" flathub
|
git clone --depth=1 --recursive "https://github.com/$flathub_target_repo.git" flathub
|
||||||
cd "$gits_folder" || exit 1
|
|
||||||
git clone --depth=1 --recursive "https://github.com/$retrodeck_repo.git" RetroDECK
|
git clone --depth=1 --recursive "https://github.com/$retrodeck_repo.git" RetroDECK
|
||||||
cd "$gits_folder/RetroDECK" || exit 1
|
|
||||||
|
|
||||||
relname=$(curl -s https://api.github.com/repos/$retrodeck_repo/releases | jq -r '[.[] | select(.prerelease == true)][0].tag_name // empty')
|
relname=$(curl -s https://api.github.com/repos/$retrodeck_repo/releases | jq -r '[.[] | select(.prerelease == true)][0].tag_name // empty')
|
||||||
if [ -z "$relname" ]; then
|
if [ -z "$relname" ]; then
|
||||||
|
@ -36,12 +34,14 @@ git rm -rf *
|
||||||
git clean -fxd # restroing git index
|
git clean -fxd # restroing git index
|
||||||
|
|
||||||
# Copying only a few files as the others are cloned by git in retrodeck.sh
|
# Copying only a few files as the others are cloned by git in retrodeck.sh
|
||||||
cd "$gits_folder/RetroDECK" || exit 1
|
files_to_copy=('LICENSE' 'README.md' 'other_licenses.txt')
|
||||||
cp -rf \
|
for file in "${files_to_copy[@]}"; do
|
||||||
'LICENSE' \
|
if [ -f "$file" ]; then
|
||||||
'README.md' \
|
cp -fv "$file" "$gits_folder/flathub"
|
||||||
'other_licenses.txt' \
|
else
|
||||||
"$gits_folder/flathub/"
|
echo "Warning: $file not found in $gits_folder/RetroDECK"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
cd "$gits_folder/flathub" || exit 1
|
cd "$gits_folder/flathub" || exit 1
|
||||||
ls -lah
|
ls -lah
|
||||||
|
|
Loading…
Reference in a new issue