mirror of
https://github.com/RetroDECK/RetroDECK.git
synced 2024-11-22 05:55:38 +00:00
VERSIONING: added versioning and CLI parameters
This commit is contained in:
parent
a62ac23da7
commit
d7202e2df6
16
.github/workflows/cooker.yml
vendored
16
.github/workflows/cooker.yml
vendored
|
@ -108,19 +108,19 @@ jobs:
|
|||
sudo flatpak-builder --user --force-clean --repo=$GITHUB_WORKSPACE/local retrodeck-flatpak-cooker net.retrodeck.retrodeck.yml
|
||||
sudo flatpak build-bundle $GITHUB_WORKSPACE/local RetroDECK.flatpak net.retrodeck.retrodeck
|
||||
|
||||
- name: Get date for artifacts
|
||||
id: date
|
||||
run: echo "::set-output name=date::$(date +'%Y%m%d_%H%M')"
|
||||
# - name: Get date for artifacts
|
||||
# id: date
|
||||
# run: echo "::set-output name=date::$(date +'%Y%m%d_%H%M')"
|
||||
|
||||
- name: Extract branch name
|
||||
shell: bash
|
||||
run: echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/})"
|
||||
id: extract_branch
|
||||
# - name: Extract branch name
|
||||
# shell: bash
|
||||
# run: echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/})"
|
||||
# id: extract_branch
|
||||
|
||||
- name: Publish the flatpak in a new cooker release
|
||||
uses: ncipollo/release-action@v1
|
||||
with:
|
||||
tag: "${{ steps.extract_branch.outputs.branch }}-${{ steps.date.outputs.date }}"
|
||||
tag: "$(flatpak run net.retrodeck.retrodeck -v)"
|
||||
body: |
|
||||
# Release Notes (Cooker)
|
||||
This is a cooker snapshot based on the commit: ${{ github.event.repository.full_name }}@${{github.sha}}.
|
||||
|
|
|
@ -60,6 +60,15 @@ cleanup-commands:
|
|||
|
||||
modules:
|
||||
|
||||
- name: version-initialization
|
||||
sources:
|
||||
- type: shell
|
||||
commands:
|
||||
- mkdir -p ${FLATPAK_DEST}/retrodeck/
|
||||
- VERSION="cooker" # REMEMBER TO CHANGE THE VERSION BEFORE PUBLISHING (AND UPDATE THE APPDATA)
|
||||
- if [ $VERSION == "cooker" ]; then VERSION=$(git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/\1/')-$(date +'%Y%m%d_%H%M'); fi
|
||||
- $VERSION >> ${FLATPAK_DEST}/retrodeck/version
|
||||
|
||||
- name: xmlstarlet
|
||||
config-opts:
|
||||
- --disable-static-libs
|
||||
|
@ -963,7 +972,6 @@ modules:
|
|||
- rm -rf /app/share/emulationstation/resources/systems/unix/es_systems.xml
|
||||
- cp es_systems.xml /app/share/emulationstation/resources/systems/unix/
|
||||
# These must be put in home folder, managed by retrodeck.sh
|
||||
- mkdir -p ${FLATPAK_DEST}/retrodeck/
|
||||
- cp es_settings.xml ${FLATPAK_DEST}/retrodeck/es_settings.xml
|
||||
|
||||
# Logo, res
|
||||
|
|
44
retrodeck.sh
44
retrodeck.sh
|
@ -3,15 +3,51 @@
|
|||
# Steam Deck SD path: /run/media/mmcblk0p1
|
||||
|
||||
# Create log
|
||||
exec 3>&1 4>&2
|
||||
trap 'exec 2>&4 1>&3' 0 1 2 3
|
||||
echo "$(date) : RetroDECK started" >&3
|
||||
exec 1>~/retrodeck/.retrodeck.log 2>&1
|
||||
# exec 3>&1 4>&2
|
||||
# trap 'exec 2>&4 1>&3' 0 1 2 3
|
||||
# echo "$(date) : RetroDECK started" >&3
|
||||
# exec 1>~/retrodeck/.retrodeck.log 2>&1
|
||||
|
||||
is_mounted() {
|
||||
mount | awk -v DIR="$1" '{if ($3 == DIR) { exit 0}} ENDFILE{exit -1}'
|
||||
}
|
||||
|
||||
for i in "$@"; do
|
||||
case $i in
|
||||
-h*|--help*)
|
||||
echo "RetroDECK v"$(cat /var/config/retrodeck/version)
|
||||
echo "
|
||||
Usage:
|
||||
flatpak run [FLATPAK-RUN-OPTION] net.retrodeck-retrodeck [ARGUMENTS]
|
||||
|
||||
Arguments:
|
||||
-h, --help Print this help
|
||||
-v, --version Print RetroDECK version
|
||||
--reset Starts the initial RetroDECK installer (backup your data first!)
|
||||
|
||||
For flatpak run specific options please run: flatpak run -h
|
||||
|
||||
https://retrodeck.net
|
||||
"
|
||||
exit
|
||||
;;
|
||||
--version*|-v*)
|
||||
cat /var/config/retrodeck/version
|
||||
exit
|
||||
;;
|
||||
--reset)
|
||||
rm -f ~/retrodeck/.lock
|
||||
shift # past argument with no value
|
||||
;;
|
||||
-*|--*)
|
||||
echo "Unknown option $i"
|
||||
exit 1
|
||||
;;
|
||||
*)
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
# if we got the .lock file it means that it's not a first run
|
||||
if [ ! -f ~/retrodeck/.lock ]
|
||||
then
|
||||
|
|
Loading…
Reference in a new issue