-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.bp
More file actions
87 lines (76 loc) · 2.41 KB
/
Copy pathsetup.bp
File metadata and controls
87 lines (76 loc) · 2.41 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
# ============================================
# Blueprint Development Environment Setup
# ============================================
#
# Bootstrap your environment for contributing to blueprint.
#
# Usage:
# blueprint apply @github:elpic/blueprint [--var WORKSPACE=~/other/path ...]
# ---- Variables ----
# Blueprint diff/status checks installed versions against these.
# Bump them here when something needs updating.
# --- Repo setup ---
var WORKSPACE ~/development/workspace/personal
var REPO_NAME blueprint
# --- Go toolchain ---
var GO_VERSION 1.25.0
var GOLANGCI_LINT_VERSION 2.11.3
var GOSEC_VERSION 2.24.7
# --- Workflow templates ---
var APP_NAME blueprint
# --- Drift checks (validated on every PR) ---
var CHECKS \
[ \
{ \
"file": "setup.bp", \
"template": "@github:elpic/templates@main:actions/github/integration/go", \
"against": ".github/workflows" \
}, \
{ \
"file": "setup.bp", \
"template": "@github:elpic/templates@main:actions/github/drift-check", \
"against": ".github/workflows" \
}, \
{ \
"file": "setup.bp", \
"template": ".blueprint/go.mod.tmpl", \
"against": "go.mod" \
} \
]
# ---- Directory structure ----
mkdir ${WORKSPACE} \
id: workspace-dir \
on: [mac, linux]
# ---- Development tools at pinned versions ----
# mise handles installation and version management automatically.
# If an installed version differs from the one below, blueprint diff will flag it.
mise go@${GO_VERSION} \
id: dev-go \
after: workspace-dir \
on: [mac, linux]
mise golangci-lint@${GOLANGCI_LINT_VERSION} \
id: dev-lint \
after: workspace-dir \
on: [mac, linux]
# ---- Clone the blueprint repository ----
clone @github:elpic/blueprint \
to: ${WORKSPACE}/${REPO_NAME} \
workdir: true \
id: blueprint-repo \
after: workspace-dir \
on: [mac, linux]
# ---- Generate GitHub Actions workflows from templates ----
render @github:elpic/templates@main:actions/github/integration/go \
output: ${WORKSPACE}/${REPO_NAME}/.github/workflows \
after: blueprint-repo \
var: SETUP=mise \
on: [mac, linux]
render @github:elpic/templates@main:actions/github/drift-check \
output: ${WORKSPACE}/${REPO_NAME}/.github/workflows \
after: blueprint-repo \
on: [mac, linux]
# ---- Keep go.mod Go version in sync with setup.bp ----
render .blueprint/go.mod.tmpl \
output: ${WORKSPACE}/${REPO_NAME}/go.mod \
after: blueprint-repo \
on: [mac, linux]