|
|
@ -20,7 +20,7 @@ struct MatchResult { |
|
|
|
}; |
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
enum BuildState { |
|
|
|
enum BuildState { |
|
|
|
START, WAITING, BUILDING, DONE, STARTING, READING, |
|
|
|
START, WAITING, BUILDING, DONE, FORKING, READING, |
|
|
|
EXIT, ERROR |
|
|
|
EXIT, ERROR |
|
|
|
}; |
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
@ -41,6 +41,7 @@ class Builder : DeadSimpleFSM<BuildState, BuildEvent> { |
|
|
|
bool build_done = false; |
|
|
|
bool build_done = false; |
|
|
|
string line = ""; |
|
|
|
string line = ""; |
|
|
|
std::future<FILE *> build_fut; |
|
|
|
std::future<FILE *> build_fut; |
|
|
|
|
|
|
|
std::future<string> read_fut; |
|
|
|
git_repository* repo = nullptr; |
|
|
|
git_repository* repo = nullptr; |
|
|
|
|
|
|
|
|
|
|
|
public: |
|
|
|
public: |
|
|
@ -60,7 +61,7 @@ class Builder : DeadSimpleFSM<BuildState, BuildEvent> { |
|
|
|
FSM_STATE(START, start, ev); |
|
|
|
FSM_STATE(START, start, ev); |
|
|
|
FSM_STATE(WAITING, waiting, ev); |
|
|
|
FSM_STATE(WAITING, waiting, ev); |
|
|
|
FSM_STATE(DONE, done, ev); |
|
|
|
FSM_STATE(DONE, done, ev); |
|
|
|
FSM_STATE(STARTING, starting, ev); |
|
|
|
FSM_STATE(FORKING, forking, ev); |
|
|
|
FSM_STATE(READING, reading, ev); |
|
|
|
FSM_STATE(READING, reading, ev); |
|
|
|
FSM_STATE(EXIT, exit, ev); |
|
|
|
FSM_STATE(EXIT, exit, ev); |
|
|
|
FSM_STATE(ERROR, exit, ev); |
|
|
|
FSM_STATE(ERROR, exit, ev); |
|
|
@ -74,7 +75,7 @@ class Builder : DeadSimpleFSM<BuildState, BuildEvent> { |
|
|
|
void start(BuildEvent ev); |
|
|
|
void start(BuildEvent ev); |
|
|
|
void waiting(BuildEvent ev); |
|
|
|
void waiting(BuildEvent ev); |
|
|
|
void done(BuildEvent ev); |
|
|
|
void done(BuildEvent ev); |
|
|
|
void starting(BuildEvent ev); |
|
|
|
void forking(BuildEvent ev); |
|
|
|
void reading(BuildEvent ev); |
|
|
|
void reading(BuildEvent ev); |
|
|
|
void error(BuildEvent ev); |
|
|
|
void error(BuildEvent ev); |
|
|
|
void exit(BuildEvent ev); |
|
|
|
void exit(BuildEvent ev); |
|
|
|