Skip to content

Commit bf7c4c5

Browse files
committed
style: Fix github_actions if code suite indentation
1 parent 34bab4e commit bf7c4c5

File tree

1 file changed

+18
-20
lines changed

1 file changed

+18
-20
lines changed

src/appimagetool.c

Lines changed: 18 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -908,28 +908,26 @@ main (int argc, char *argv[])
908908
printf("Will not guess update information since zsyncmake is missing\n");
909909
}
910910
}
911-
gchar *zsyncmake_path = g_find_program_in_path ("zsyncmake");
912-
if (zsyncmake_path){
913-
char buf[1024];
914-
printf("Running on GitHub Actions\n");
915-
if (strstr(github_ref, "/pull/")) {
916-
printf("Will not calculate update information for GitHub because this is a pull request\n");
917-
} else {
918-
gchar **parts = g_strsplit (github_repository, "/", 0);
919-
920-
char* channel;
921-
if (github_ref != "" && strstr(github_ref, "/continuous/")) {
922-
channel = "latest";
923-
} else {
924-
channel = "continuous";
925-
}
926911
sprintf(buf, "gh-releases-zsync|%s|%s|%s|%s*-%s.AppImage.zsync", parts[0], parts[1], channel, app_name_for_filename, arch);
927-
updateinformation = buf;
928-
printf("Guessing update information based on $GITHUB_REPOSITORY=%s and $GITHUB_REF=%s\n", github_repository, github_ref);
929-
printf("%s\n", updateinformation);
930-
}
931-
}
932912
} else if (github_repository != NULL && github_ref != NULL) {
913+
printf("Running on GitHub Actions\n");
914+
gchar *zsyncmake_path = g_find_program_in_path ("zsyncmake");
915+
if (zsyncmake_path) {
916+
if (strstr(github_ref, "/pull/")) {
917+
printf("Will not calculate update information for GitHub because this is a pull request\n");
918+
} else {
919+
printf("Guessing update information based on $GITHUB_REPOSITORY=%s and $GITHUB_REF=%s\n", github_repository, github_ref);
920+
char buf[1024];
921+
gchar **parts = g_strsplit (github_repository, "/", 2);
922+
char* channel;
923+
if (github_ref != "" && strstr(github_ref, "/continuous/")) {
924+
channel = "latest";
925+
} else {
926+
channel = "continuous";
927+
}
928+
updateinformation = buf;
929+
printf("%s\n", updateinformation);
930+
}
933931
} else if(CI_COMMIT_REF_NAME){
934932
// ${CI_PROJECT_URL}/-/jobs/artifacts/${CI_COMMIT_REF_NAME}/raw/QtQuickApp-x86_64.AppImage?job=${CI_JOB_NAME}
935933
gchar *zsyncmake_path = g_find_program_in_path ("zsyncmake");

0 commit comments

Comments
 (0)