Skip to content

Commit

Permalink
Small QoL changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Willy-JL committed Aug 4, 2024
1 parent fbe771a commit ecd3416
Show file tree
Hide file tree
Showing 3 changed files with 110 additions and 109 deletions.
214 changes: 107 additions & 107 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,110 +39,110 @@ jobs:
path: |
./build/qFlipper-x86_64.AppImage
if-no-files-found: error
retention-days: 1

build_mac:
runs-on: [self-hosted, ARM64, macOS, qFlipper]
env:
MAC_OS_KEYCHAIN_NAME: ${{ secrets.MAC_OS_KEYCHAIN_NAME }}
MAC_OS_KEYCHAIN_PASSWORD: ${{ secrets.MAC_OS_KEYCHAIN_PASSWORD }}
MAC_OS_SIGNING_KEY_ID: ${{ secrets.MAC_OS_SIGNING_KEY_ID }}
MAC_OS_SIGNING_TEAM_ID: ${{ secrets.MAC_OS_SIGNING_TEAM_ID }}
MAC_OS_SIGNING_USERNAME: ${{ secrets.MAC_OS_SIGNING_USERNAME }}
MAC_OS_SIGNING_PASSWORD: ${{ secrets.MAC_OS_SIGNING_PASSWORD }}
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
submodules: true
fetch-depth: 0

- name: Build application
run: ./build_mac.sh

- name: Publish application
uses: actions/upload-artifact@v4
with:
name: qflipper.dmg
path: |
./build_mac/qflipper.dmg
if-no-files-found: error
retention-days: 1

build_windows:
runs-on: [self-hosted, X64, Windows]
env:
SIGNING_TOOL: ${{ secrets.WIN_SIGNING_TOOL }}
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
submodules: true
fetch-depth: 0 # must to be there, see installer_windows.nsi file for details

- name: Build application
run: .\build_windows.bat

- name: Publish application
uses: actions/upload-artifact@v4
with:
name: qFlipperSetup-64bit.exe
path: |
.\build\qFlipperSetup-64bit.exe
.\build\qFlipper-64bit.zip
if-no-files-found: error
retention-days: 1

upload:
name: Upload apps to storage
needs: [build_windows, build_mac, build_linux]
runs-on: ubuntu-latest
steps:

- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: 'Make artifacts directory'
run: |
test -d artifacts && rm -rf artifacts || true
mkdir artifacts
- name: 'Generate tag suffix'
if: startsWith(github.ref, 'refs/tags/') == true
run: |
echo "REF=$(git describe --tags --abbrev=0)" >> $GITHUB_ENV
echo "SUFFIX=$(git describe --tags --abbrev=0)" >> $GITHUB_ENV
- name: 'Generate branch suffix'
if: startsWith(github.ref, 'refs/tags/') != true
run: |
echo "REF=$(git rev-parse --abbrev-ref HEAD)" >> $GITHUB_ENV
echo "SUFFIX=$(git rev-parse --abbrev-ref HEAD | sed 's/\//_/g')-$(date +'%d%m%Y')-$(git rev-parse --short HEAD)" >> $GITHUB_ENV
- uses: actions/download-artifact@v4
with:
name: qFlipper-x86_64.AppImage
- uses: actions/download-artifact@v4
with:
name: qFlipperSetup-64bit.exe
- uses: actions/download-artifact@v4
with:
name: qflipper.dmg

- name: Rename app
run: |
mv qFlipper-x86_64.AppImage ./artifacts/qFlipper-x86_64-${SUFFIX}.AppImage
mv qFlipperSetup-64bit.exe ./artifacts/qFlipperSetup-64bit-${SUFFIX}.exe
mv qFlipper-64bit.zip ./artifacts/qFlipper-64bit-${SUFFIX}.zip
mv qflipper.dmg ./artifacts/qFlipper-${SUFFIX}.dmg
- name: Upload artifacts to update server
if: ${{ !github.event.pull_request.head.repo.fork }}
run: |
FILES=$(for CUR in $(ls artifacts/); do echo "-F files=@artifacts/$CUR"; done)
curl --fail -L -H "Token: ${{ secrets.INDEXER_TOKEN }}" \
-F "branch=${REF}" \
${FILES[@]} \
"${{ secrets.INDEXER_URL }}"/qFlipper/uploadfiles
# retention-days: 1

# build_mac:
# runs-on: [self-hosted, ARM64, macOS, qFlipper]
# env:
# MAC_OS_KEYCHAIN_NAME: ${{ secrets.MAC_OS_KEYCHAIN_NAME }}
# MAC_OS_KEYCHAIN_PASSWORD: ${{ secrets.MAC_OS_KEYCHAIN_PASSWORD }}
# MAC_OS_SIGNING_KEY_ID: ${{ secrets.MAC_OS_SIGNING_KEY_ID }}
# MAC_OS_SIGNING_TEAM_ID: ${{ secrets.MAC_OS_SIGNING_TEAM_ID }}
# MAC_OS_SIGNING_USERNAME: ${{ secrets.MAC_OS_SIGNING_USERNAME }}
# MAC_OS_SIGNING_PASSWORD: ${{ secrets.MAC_OS_SIGNING_PASSWORD }}
# steps:
# - name: Checkout code
# uses: actions/checkout@v4
# with:
# submodules: true
# fetch-depth: 0

# - name: Build application
# run: ./build_mac.sh

# - name: Publish application
# uses: actions/upload-artifact@v4
# with:
# name: qflipper.dmg
# path: |
# ./build_mac/qflipper.dmg
# if-no-files-found: error
# retention-days: 1

# build_windows:
# runs-on: [self-hosted, X64, Windows]
# env:
# SIGNING_TOOL: ${{ secrets.WIN_SIGNING_TOOL }}
# steps:
# - name: Checkout code
# uses: actions/checkout@v4
# with:
# submodules: true
# fetch-depth: 0 # must to be there, see installer_windows.nsi file for details

# - name: Build application
# run: .\build_windows.bat

# - name: Publish application
# uses: actions/upload-artifact@v4
# with:
# name: qFlipperSetup-64bit.exe
# path: |
# .\build\qFlipperSetup-64bit.exe
# .\build\qFlipper-64bit.zip
# if-no-files-found: error
# retention-days: 1

# upload:
# name: Upload apps to storage
# needs: [build_windows, build_mac, build_linux]
# runs-on: ubuntu-latest
# steps:

# - name: Checkout code
# uses: actions/checkout@v4
# with:
# fetch-depth: 0

# - name: 'Make artifacts directory'
# run: |
# test -d artifacts && rm -rf artifacts || true
# mkdir artifacts

# - name: 'Generate tag suffix'
# if: startsWith(github.ref, 'refs/tags/') == true
# run: |
# echo "REF=$(git describe --tags --abbrev=0)" >> $GITHUB_ENV
# echo "SUFFIX=$(git describe --tags --abbrev=0)" >> $GITHUB_ENV

# - name: 'Generate branch suffix'
# if: startsWith(github.ref, 'refs/tags/') != true
# run: |
# echo "REF=$(git rev-parse --abbrev-ref HEAD)" >> $GITHUB_ENV
# echo "SUFFIX=$(git rev-parse --abbrev-ref HEAD | sed 's/\//_/g')-$(date +'%d%m%Y')-$(git rev-parse --short HEAD)" >> $GITHUB_ENV

# - uses: actions/download-artifact@v4
# with:
# name: qFlipper-x86_64.AppImage
# - uses: actions/download-artifact@v4
# with:
# name: qFlipperSetup-64bit.exe
# - uses: actions/download-artifact@v4
# with:
# name: qflipper.dmg

# - name: Rename app
# run: |
# mv qFlipper-x86_64.AppImage ./artifacts/qFlipper-x86_64-${SUFFIX}.AppImage
# mv qFlipperSetup-64bit.exe ./artifacts/qFlipperSetup-64bit-${SUFFIX}.exe
# mv qFlipper-64bit.zip ./artifacts/qFlipper-64bit-${SUFFIX}.zip
# mv qflipper.dmg ./artifacts/qFlipper-${SUFFIX}.dmg

# - name: Upload artifacts to update server
# if: ${{ !github.event.pull_request.head.repo.fork }}
# run: |
# FILES=$(for CUR in $(ls artifacts/); do echo "-F files=@artifacts/$CUR"; done)
# curl --fail -L -H "Token: ${{ secrets.INDEXER_TOKEN }}" \
# -F "branch=${REF}" \
# ${FILES[@]} \
# "${{ secrets.INDEXER_URL }}"/qFlipper/uploadfiles
2 changes: 1 addition & 1 deletion application/components/ChangelogDialog.qml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ CustomDialog {
text: !(Backend.firmwareUpdateState === Backend.Unknown ||
Backend.firmwareUpdateState === Backend.Checking ||
Backend.firmwareUpdateState === Backend.ErrorOccured) ?
Backend.latestFirmwareVersion.changelog : qsTr("No data")
Backend.latestFirmwareVersion.changelog.replace(/\n/g, "\n\n") : qsTr("No data")

textFormat: Text.MarkdownText

Expand Down
3 changes: 2 additions & 1 deletion application/components/HomeOverlay.qml
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,8 @@ AbstractOverlay {
str = "Unknown";
}

return "%1 %2".arg(str).arg(Backend.latestFirmwareVersion.number.split("-")[0]);
let splitVersion = Backend.latestFirmwareVersion.number.split("-");
return "%1 %2".arg(str).arg(splitVersion[splitVersion.length - 1]);
}

onTriggered: changelogDialog.open()
Expand Down

0 comments on commit ecd3416

Please sign in to comment.