Debugging getting a repo state on macos.

This commit is contained in:
Roman Telezhynskyi 2024-07-08 12:12:16 +03:00
parent 24fc530899
commit 26813eb11d
2 changed files with 6 additions and 1 deletions

View file

@ -661,6 +661,7 @@ for:
- qbs config profiles.qt6.baseProfile clang
- conan install . -s os=Macos --build=missing -o with_crash_reporting=True -pr=valentina
- git fetch --tags
- git describe --always HEAD
- qbs build -f valentina.qbs -d ${APPVEYOR_BUILD_FOLDER}/build --jobs $(nproc) config:release modules.buildconfig.enableUnitTests:false modules.buildconfig.enableMultiBundle:${MULTI_BUNDLE} qbs.installRoot:${APPVEYOR_BUILD_FOLDER}/build/install-root profile:qt6 project.minimumMacosVersion:${MACOS_DEPLOYMENT_TARGET} modules.buildconfig.enableCcache:true moduleProviders.qbspkgconfig.extraPaths:$(brew --prefix xerces-c)/lib/pkgconfig,$(brew --prefix qt6)/lib/pkgconfig,$(brew --prefix openssl@1.1)/lib/pkgconfig "modules.buildconfig.signingIdentity:$MACOS_CERTIFICATE_NAME" modules.macdeployqt.libpath:$(brew --prefix qt6)/lib,$(brew --prefix poppler)/lib modules.macdeployqt.macdeployqtProgramBinPath:${HOME}/macdeployqt-install-dir project.enableConan:true project.conanWithCrashReporting:true project.conanProfiles:valentina
- export QTDIR=$(brew --prefix qt6)
- export CRASH_QT_VERSION=$($QTDIR/bin/qmake -query QT_VERSION | awk -F. '{print $1 "_" $2}')

View file

@ -91,12 +91,13 @@ Module {
property string repoStateRevision
configure: {
console.info("Reading the repo state.");
var commitsProbe = new Process();
try {
commitsProbe.setWorkingDirectory(theRepoDir);
var exitCode = commitsProbe.exec(tool, ["rev-list", "HEAD", "--count"], false);
if (exitCode !== 0) {
console.info("Cannot read repo state.");
console.info("Cannot read the repo state.");
return;
}
@ -119,6 +120,7 @@ Module {
proc.exec(tool, ["describe", "--always", "HEAD"], true);
repoState = proc.readStdOut().trim();
if (repoState) {
console.info("Repo state:" + repoState);
found = true;
const tagSections = repoState.split("-");
@ -130,6 +132,8 @@ Module {
} else {
repoStateRevision = tagSections[0];
}
} else {
console.info("Unable to get the repo state. " + repoState);
}
} finally {
proc.close();