mirror of
https://github.com/xHyroM/gimi.git
synced 2024-11-24 00:21:04 +01:00
fix: add push option only for specific providers
This commit is contained in:
parent
45d13856ec
commit
4c3271703d
1 changed files with 8 additions and 1 deletions
|
@ -34,7 +34,14 @@ int git_push(char *provider_name, char *branch_name, bool verbose) {
|
||||||
char output[1024];
|
char output[1024];
|
||||||
char command[256];
|
char command[256];
|
||||||
|
|
||||||
snprintf(command, sizeof(command), "git push -o skip-ci gimi-%s %s 2>&1",
|
char push_option[50] = "";
|
||||||
|
if (strcmp(provider_name, "sourcehut") == 0) {
|
||||||
|
strcat(push_option, " -o skip-ci");
|
||||||
|
} else if (strcmp(provider_name, "gitlab") == 0) {
|
||||||
|
strcat(push_option, " -o ci.skip");
|
||||||
|
}
|
||||||
|
|
||||||
|
snprintf(command, sizeof(command), "git push%s gimi-%s %s 2>&1", push_option,
|
||||||
provider_name, branch_name);
|
provider_name, branch_name);
|
||||||
|
|
||||||
file_ptr = popen(command, "r");
|
file_ptr = popen(command, "r");
|
||||||
|
|
Loading…
Reference in a new issue