Skip to content

Instantly share code, notes, and snippets.

@dallaslu
Last active March 28, 2024 16:33
Show Gist options
  • Save dallaslu/8bcd16294e1b0e380a3e to your computer and use it in GitHub Desktop.
Save dallaslu/8bcd16294e1b0e380a3e to your computer and use it in GitHub Desktop.
$tag_name = str_replace("refs/tags/","",$json->ref);
$argsment = $tag_name;
if( !empty($json->repository)){
$work_path = $json->repository->git_ssh_url;
$work_path = explode(":", $work_path);
$work_path = explode(".", $work_path[1]);
log_append('work_path: ' . $work_path[0]);
$argsment .= ' ' . $work_path[0];
}
log_append('Launching shell hook script...');
$command = 'sh ' . $hookfile . ' '. $argsment;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment