-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathsqlpad.yaml
71 lines (60 loc) · 2.26 KB
/
sqlpad.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
package:
name: sqlpad
version: 7.4.1 # when updating check the patch below as it contains dependency version updates which may downgrade if upstream upgrades them
epoch: 100
description: Web-based SQL editor. Legacy project in maintenance mode.
copyright:
- license: MIT
dependencies:
runtime:
- nodejs-18 # currently needs node 20, to check in the future see, https://github.com/sqlpad/sqlpad/blob/master/.nvmrc
- yarn
environment:
contents:
packages:
- build-base
- busybox
- jq
- nodejs-18
- python3
- yarn
pipeline:
- uses: git-checkout
with:
repository: https://github.com/sqlpad/sqlpad
expected-commit: 5929bbb5ca78e187952673f454a84aabe80e304a
tag: v${{package.version}}
- working-directory: /home/build/server
runs: |
# Create "resolutions" section of package.json
jq '.resolutions |= (if . then . else {} end)' package.json > temp.json && mv temp.json package.json
for override in '"semver"="6.3.1"' '"@node-saml/node-saml"="4.0.5"' '"ip"="2.0.1"' '"jose"="4.15.5"' '"xlsx"="https://cdn.sheetjs.com/xlsx-0.20.2/xlsx-0.20.2.tgz"' '"tar"="6.2.1"'; do
jq ".resolutions.${override}" package.json > temp.json && mv temp.json package.json
done
for dep in '"express"="4.21.1"'; do
jq ".dependencies.${dep}" package.json > temp.json && mv temp.json package.json
done
yarn install
- uses: patch
with:
patches: build-sh.patch
- runs: |
./scripts/build.sh
mkdir -p ${{targets.destdir}}/usr/bin
mv server ${{targets.destdir}}/usr/bin/sqlpad-server
# Remove files adding unnecessary/incorrect shebang deps: dtrace and groovy
rm ${{targets.destdir}}/usr/bin/sqlpad-server/node_modules/cassandra-driver/Jenkinsfile
rm ${{targets.destdir}}/usr/bin/sqlpad-server/node_modules/ldapjs/examples/snoopldap.d
- uses: strip
subpackages:
- name: "${{package.name}}-compat"
description: "Compatibility package to place binaries in the location expected by upstream"
pipeline:
- runs: |
mkdir -p "${{targets.subpkgdir}}"/usr/app
ln -s /usr/bin/sqlpad-server ${{targets.subpkgdir}}/usr/app
update:
enabled: true
github:
identifier: sqlpad/sqlpad
strip-prefix: v