forked from semaphoreui/semaphore
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTaskfile.ex.yml
More file actions
50 lines (47 loc) · 1.94 KB
/
Copy pathTaskfile.ex.yml
File metadata and controls
50 lines (47 loc) · 1.94 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
version: "3"
tasks:
build:edition:
desc: Build traceable full-product server, runner, and frontend artifacts
vars:
EDITION: enhanced
IMPLEMENTATION_VERSION:
sh: echo "{{ .ENHANCED_REVISION }}" | cut -c1-12 | sed 's/^/enhanced-/'
OUTPUT_DIR: '{{ .OUTPUT_DIR | default "dist/product" }}'
cmds:
- task: build:fe:edition
vars:
OUTPUT_DIR: '{{ .OUTPUT_DIR }}'
- task: build:be
- >-
go run ./tools/buildmeta
-binary "bin/semaphore"
-frontend "api/public"
-frontend-lock "web/package-lock.json"
-source-maps "{{ .OUTPUT_DIR }}.source-maps"
-output "{{ .OUTPUT_DIR }}"
-edition "{{ .EDITION }}"
-core-revision "{{ .CORE_REVISION }}"
-enhanced-revision "{{ .ENHANCED_REVISION }}"
-implementation "{{ .IMPLEMENTATION_VERSION }}"
-source-date-epoch "{{ .SOURCE_DATE_EPOCH }}"
build:fe:edition:
desc: Rebuild production frontend and separate deterministic debug source maps
dir: web
cmds:
- >-
{{ if eq OS "windows" }}set VUE_APP_SOURCE_MAP_MODE=none && {{ else }}env VUE_APP_SOURCE_MAP_MODE=none{{ end }}
npm run build
- >-
{{ if eq OS "windows" }}set VUE_APP_SOURCE_MAP_MODE=hidden && set VUE_APP_OUTPUT_DIR={{ .ROOT_DIR }}/{{ .OUTPUT_DIR }}.frontend-debug && {{ else }}env VUE_APP_SOURCE_MAP_MODE=hidden VUE_APP_OUTPUT_DIR="{{ .ROOT_DIR }}/{{ .OUTPUT_DIR }}.frontend-debug"{{ end }}
npm run build
- >-
cd "{{ .ROOT_DIR }}" && go run ./tools/frontendmaps
-production "api/public"
-debug "{{ .OUTPUT_DIR }}.frontend-debug"
-output "{{ .OUTPUT_DIR }}.source-maps"
release:notes:
desc: Extract the CHANGELOG.md section of the current tag (OUTPUT defaults to dist/release-notes.md)
vars:
OUTPUT: '{{ .OUTPUT | default "dist/release-notes.md" }}'
cmds:
- bash tools/release-notes.sh --output "{{ .OUTPUT }}"