feat: implement build backend and += env operator, add style guide
- Replace build stub with full phase execution (prepare/build/check/install) via /bin/sh with variable interpolation, config file generation, and env handling (hard-set, soft/?=, append/+=) - Add += append operator for environment variables across DSL, parser, system config parser, build backend, and formatter - Add STYLEGUIDE.md documenting all codebase conventions - Replace EnvEntry bool soft with EnvMode enum (Set/Soft/Append) - Add Plus token type to lexer for += parsing
This commit is contained in:
@@ -13,9 +13,8 @@ struct BuildResult {
|
||||
};
|
||||
|
||||
// Build a single package step into work_dir.
|
||||
//
|
||||
// NOTE: compile-only stub — the real build backend was never committed.
|
||||
// Always fails so the rebuild pipeline never records a fake install.
|
||||
// Runs prepare, build, check, and install phases in order,
|
||||
// with full variable interpolation and config file generation.
|
||||
BuildResult build(const resolve::BuildStep& step,
|
||||
const std::string& work_dir,
|
||||
int jobs);
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
#pragma once
|
||||
|
||||
#include <cstdint>
|
||||
#include <string>
|
||||
#include <unordered_map>
|
||||
#include <unordered_set>
|
||||
@@ -38,10 +39,12 @@ struct Patch {
|
||||
int level = 1;
|
||||
};
|
||||
|
||||
enum class EnvMode : std::uint8_t { Set, Soft, Append };
|
||||
|
||||
struct EnvEntry {
|
||||
std::string key;
|
||||
std::string value;
|
||||
bool soft = false;
|
||||
EnvMode mode = EnvMode::Set;
|
||||
};
|
||||
|
||||
struct NamedService {
|
||||
|
||||
@@ -13,6 +13,7 @@ enum class TokenType {
|
||||
Lbrace, // {
|
||||
Rbrace, // }
|
||||
Equals, // =
|
||||
Plus, // +
|
||||
Lbracket, // [
|
||||
Rbracket, // ]
|
||||
Comma, // ,
|
||||
|
||||
Reference in New Issue
Block a user