Added features
Added: Project Overview TUI Build Cache / Dirty Detection Post-Build Hooks gbuild status
This commit is contained in:
@@ -6,6 +6,18 @@
|
||||
|
||||
#define CFG_MAX 512
|
||||
|
||||
/*
|
||||
* Per-project hook override loaded from a [project:<name>] section.
|
||||
* Up to CFG_MAX_PROJECT_OVERRIDES overrides are supported.
|
||||
*/
|
||||
#define CFG_MAX_PROJECT_OVERRIDES 64
|
||||
#define CFG_PROJECT_NAME_LEN 128
|
||||
|
||||
typedef struct {
|
||||
char name[CFG_PROJECT_NAME_LEN]; /* project name, e.g. "myproject" */
|
||||
char post_build_hook[CFG_MAX]; /* hook command for this project */
|
||||
} GProjectOverride;
|
||||
|
||||
typedef struct {
|
||||
char git_url[CFG_MAX];
|
||||
char git_user[256];
|
||||
@@ -15,8 +27,24 @@ typedef struct {
|
||||
char clone_dir[CFG_MAX];
|
||||
bool log_enabled;
|
||||
char log_dir[CFG_MAX];
|
||||
|
||||
/* Post-build hook run after every successful make invocation.
|
||||
* The hook is executed with the repo directory as its CWD.
|
||||
* An empty string means "no hook". */
|
||||
char post_build_hook[CFG_MAX];
|
||||
|
||||
/* Per-project hook overrides from [project:<name>] sections. */
|
||||
GProjectOverride project_overrides[CFG_MAX_PROJECT_OVERRIDES];
|
||||
int project_override_count;
|
||||
} GConfig;
|
||||
|
||||
/*
|
||||
* Return the effective post-build hook for a given project name.
|
||||
* Checks [project:<name>] overrides first; falls back to the global hook.
|
||||
* Returns a pointer into cfg — do not free.
|
||||
*/
|
||||
const char *config_hook_for(const GConfig *cfg, const char *project);
|
||||
|
||||
void config_defaults(GConfig *cfg);
|
||||
int config_load(GConfig *cfg, const char *path);
|
||||
int config_save(const GConfig *cfg, const char *path);
|
||||
|
||||
Reference in New Issue
Block a user