summaryrefslogtreecommitdiff
path: root/build
diff options
context:
space:
mode:
Diffstat (limited to 'build')
-rw-r--r--build/instructions.go13
-rw-r--r--build/phases.go14
2 files changed, 27 insertions, 0 deletions
diff --git a/build/instructions.go b/build/instructions.go
new file mode 100644
index 0000000..2676a75
--- /dev/null
+++ b/build/instructions.go
@@ -0,0 +1,13 @@
+package build
+
+type InstructionType int
+
+const (
+ Run InstructionType = iota
+ Copy
+)
+
+type Instruction struct {
+ Type InstructionType
+ Arguments []string
+}
diff --git a/build/phases.go b/build/phases.go
new file mode 100644
index 0000000..095263c
--- /dev/null
+++ b/build/phases.go
@@ -0,0 +1,14 @@
+package build
+
+type Phase int
+
+const (
+ PhasePrivileged Phase = iota
+ PhasePrivilegeDropped
+ PhasePreInstall
+ PhasePostInstall
+)
+
+type PhaseCompileable interface {
+ InstructionsForPhase(phase Phase) []Instruction
+}