-
Notifications
You must be signed in to change notification settings - Fork 0
/
default.scripts.yaml
151 lines (138 loc) · 4.92 KB
/
default.scripts.yaml
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
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
install-osx.brew: /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
install-osx.deno: |
brew install deno
install-osx:
series:
- task: install-osx.brew
- task: install-osx.deno
- task: create-ssl-certificate
docker:
series:
- task: docker.build
- task: docker.run
docker.build: docker build -t the-monorepo .
docker.run: docker run --mount type=bind,source="$(pwd)",target=/app --rm -it the-monorepo bash
# Note: If you've broken scriptplan then you either rollback then rollback to the old scriptplan file or try run this script directly in the terminal
# FIXME: Find an alternative to mv that would work for default Windows machines
recompile-scriptplan-release: |
cargo build --release --bins --target x86_64-pc-windows-gnu --package scriptplan-cli
cargo build --release --bins --target x86_64-apple-darwin --package scriptplan-cli
#cargo build --release --bins --target x86_64-unknown-linux-gnu --package scriptplan-cli
mv ./target/x86_64-pc-windows-gnu/release/scriptplan.exe ./scriptplan.exe
mv ./target/x86_64-apple-darwin/release/scriptplan ./scriptplan
# mv ./target/x86_64-unknown-linux-gnu/release/scriptplan ./scriptplan-linux-gnu
recompile-scriptplan-debug: |
cargo build --bins --target x86_64-pc-windows-gnu --package scriptplan-cli
cargo build --bins --target x86_64-apple-darwin --package scriptplan-cli
#cargo build --bins --target x86_64-unknown-linux-gnu --package scriptplan-cli
mv ./target/x86_64-pc-windows-gnu/debug/scriptplan.exe ./scriptplan.exe
mv ./target/x86_64-apple-darwin/debug/scriptplan ./scriptplan
#mv ./target/x86_64-unknown-linux-gnu/debug/scriptplan ./scriptplan-linux
node-base: yarn node --require=./transpile-at-runtime.js --require=./original-code-require-override.ts
buildplan:
task: node-base buildplan.ts
deno-run: deno run --config ./tsconfig.deno.json
buildplan.deno:
task: deno-run --allow-read --allow-write --import-map=node.import-map.json ./buildplan.deno.ts
format.javascript:
task: buildplan format
# TODO: Should be a part of format.rust but errors out ATM
format.rust.fix: cargo fix
format.rust.fmt: cargo fmt
format.rust:
series:
- task: format.rust.fix
- task: format.rust.fmt
format:
description: Formats all your source code files
parallel:
- task: format.rust
- task: format.javascript
format-staged.javascript:
task: buildplan format-staged
format-staged:
description: Corrects any automatically fixable linter warnings or errors. Note that this command will overwrite files without creating a backup.
parallel:
- task: format-staged.javascript
- task: format.rust
test:
task: buildplan test
clean:
task: buildplan clean
transpile:
description: Transpiles source code
task: buildplan transpile
copy:
task: buildplan copy
build.import-maps: yarn run node-import-map-generator
build:
description: Builds everything required to run packages other than certain slow (bundled) packages
series:
- parallel:
- task: transpile
- task: copy
# - task: build.rust
- parallel:
# - task: build.import-maps
- task: writeme
build.node:
task: buildplan build
# FIXME: Go figure out how to get AVR and the rest all the packages to play nicely together in a single cargo build (maybe it's impossible?)
build.rust:
script: cargo build
build-all:
description: Build literally everything including things that require bundling (slower)
series:
- task: build
- task: webpack
watch:
description: Like build but continuously watches for changes
task: buildplan watch
writeme:
description: Generates README doco
task: buildplan writeme
webpack:
task: buildplan webpack
serve:
task: buildplan serve
serve.my-resume:
task: serve --name='my-resume'
serve.page-breaker:
task: serve --name='page-breaker'
serve.genetic-sequence-analysis-app:
task: serve --name='genetic-sequence-analysis-app'
precommit:
description: Run this before your commit to prevent trivial build errors (like linting/formatting) from failing your build
series:
- parallel:
- task: transpile
- task: format-staged
- task: copy
- task: writeme
prepublish:
description: Run this before publishing any packages
series:
- task: clean
- parallel:
- task: format
- series:
- parallel:
- task: transpile
# ESLint preset config is currently a JS file
- task: copy
- parallel:
- task: test
- task: webpack
- task: check-types
- task: writeme
check-types:
description: Run TypeScript validation
task: buildplan check-types
update-yarn: |
yarn set version berry
yarn add @yarnpkg/sdks
yarn install
yarn run sdks
update-browserslist: |
yarn dlx browserslist --update-db
create-ssl-certificate: openssl req -x509 -config localhost.cnf -new -nodes -keyout localhost.key -out localhost.crt