Skip to content

Commit 1dcd368

Browse files
fix(ci): resolve build failures across all platforms
- macOS: use `sed -i ''` (BSD sed requires empty extension arg) - Linux: add `#include <limits.h>` to xdiff/git-compat-util.h for CHAR_BIT - Windows Qt 6.5: add missing `#include <QGuiApplication>` in BranchPickerPopup - Windows Qt 6.10: fix forward-decl mismatch (class→struct) for GitCommitInfo Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 6ed05e0 commit 1dcd368

4 files changed

Lines changed: 8 additions & 2 deletions

File tree

.github/workflows/build.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,11 @@ jobs:
3131
shell: bash
3232
run: |
3333
VER="${GITHUB_REF_NAME#v}"
34-
sed -i 's/^\([[:space:]]*VERSION[[:space:]]*\).*/\1'"$VER"'/' CMakeLists.txt
34+
if [[ "$OSTYPE" == darwin* ]]; then
35+
sed -i '' 's/^\([[:space:]]*VERSION[[:space:]]*\).*/\1'"$VER"'/' CMakeLists.txt
36+
else
37+
sed -i 's/^\([[:space:]]*VERSION[[:space:]]*\).*/\1'"$VER"'/' CMakeLists.txt
38+
fi
3539
grep -n '^[[:space:]]*VERSION' CMakeLists.txt
3640
3741
- name: Install Qt

src/git/BranchPickerPopup.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818

1919
#include "BranchPickerPopup.h"
2020

21+
#include <QGuiApplication>
2122
#include <QKeyEvent>
2223
#include <QLineEdit>
2324
#include <QListView>

src/git/GitHistoryView.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ class GitHistoryView : public QWidget
7272
void keyPressEvent(QKeyEvent *event) override;
7373

7474
private slots:
75-
void onCommitsAppended(const QVector<class GitCommitInfo> &chunk);
75+
void onCommitsAppended(const QVector<struct GitCommitInfo> &chunk);
7676
void onFetchStarted();
7777
void onFetchFinished(bool reachedEnd, const QString &errorMessage);
7878
void onRowActivated(const QModelIndex &index);

thirdparty/xdiff/git-compat-util.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
#define GIT_COMPAT_UTIL_H
1313

1414
#include <ctype.h>
15+
#include <limits.h>
1516
#include <stddef.h>
1617
#include <stdint.h>
1718
#include <stdio.h>

0 commit comments

Comments
 (0)