File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ COPY . .
1010RUN --mount=type=cache,target=/go/pkg/mod/ \
1111 CGO_ENABLED=0 go build -o /bin/hackstack .
1212
13- # ========== CLI RUN STAGE ==========
13+ # ========== CLI SETUP STAGE ==========
1414FROM ubuntu:22.04 AS setup
1515
1616ENV DEBIAN_FRONTEND=noninteractive
@@ -29,8 +29,13 @@ RUN addgroup --gid $GROUP_ID ${USERNAME} && \
2929
3030USER ${USERNAME}
3131ENV HOME=/home/${USERNAME}
32- WORKDIR ${HOME}/projects
32+ ARG PROJECT_DIR="${HOME}/projects"
33+ WORKDIR ${PROJECT_DIR}
3334
35+ COPY examples/ ./examples/
36+ RUN mkdir -p "${PROJECT_DIR}/backend" "${PROJECT_DIR}/cli"
37+
38+ # ========== APP RUN STAGE ==========
3439FROM setup AS app
3540
3641ENTRYPOINT [ "/bin/hackstack" ]
Original file line number Diff line number Diff line change @@ -38,5 +38,16 @@ test-all: test-base
3838 @ echo " hackstack CLI integration test completed!"
3939
4040test-base :
41- @ just hackstack --version | grep -n " hackstack"
42- @ just hackstack --help 2 >&1 | grep -n " hackstack"
41+ #!/usr/bin/env bash
42+ just hackstack --version | grep -n " hackstack"
43+ just hackstack --help 2 >&1 | grep -n " hackstack"
44+
45+ test-build :
46+ #!/usr/bin/env bash
47+ just hackstack build --help
48+ just hackstack build build backend \
49+ - -output " /home/testuser/projects/backend" \
50+ - -source examples/ datasource.yaml
51+ just hackstack build build cli \
52+ - -output " /home/testuser/projects/cli" \
53+ - -source examples/ datasource.yaml
You can’t perform that action at this time.
0 commit comments