@@ -13,18 +13,21 @@ export CI=${CI:-false}
13
13
export WASI=${WASI:- false}
14
14
if $WASI
15
15
then
16
- export BUILD_PATH=postgresql- ${PG_BRANCH} /build/postgres- wasi
16
+ BUILD= wasi
17
17
else
18
- export BUILD_PATH=postgresql- ${PG_BRANCH} /build/postgres- emscripten
18
+ BUILD= emscripten
19
19
fi
20
20
21
+ export BUILD_PATH=postgresql-${PG_BRANCH} /build/postgres-${BUILD}
22
+
23
+
21
24
PG_DIST_EXT=" ${WORKSPACE} /postgresql-${PG_BRANCH} /dist/extensions-emsdk"
22
25
PG_DIST_PGLITE=" ${WORKSPACE} /postgresql-${PG_BRANCH} /dist/pglite-sandbox"
23
26
24
27
# for local testing
25
28
if [ -d /srv/www/html/pglite-web ]
26
29
then
27
- echo " local build"
30
+ echo " local ${BUILD} build"
28
31
export PG_DIST_WEB=" /srv/www/html/pglite-web"
29
32
export LOCAL=true
30
33
else
@@ -58,11 +61,12 @@ mkdir -p $CONTAINER_PATH/tmp
58
61
cat > $CONTAINER_PATH /tmp/portable.opts << END
59
62
export DEBUG=${DEBUG}
60
63
export USE_ICU=${USE_ICU}
61
- export PG_VERSION=$PG_VERSION
62
- export PG_BRANCH=$PG_BRANCH
63
- export GETZIC=$GETZIC
64
- export ZIC=$ZIC
65
- export CI=$CI
64
+ export PG_VERSION=${PG_VERSION}
65
+ export PG_BRANCH=${PG_BRANCH}
66
+ export GETZIC=${GETZIC}
67
+ export ZIC=${ZIC}
68
+ export CI=${CI}
69
+ export WASI=${WASI}
66
70
END
67
71
68
72
@@ -85,25 +89,30 @@ ${WORKSPACE}/portable/portable.sh
85
89
86
90
du -hs $BUILD_PATH $PG_DIST_EXT $PG_DIST_PGLITE
87
91
88
- if [ -f ${WORKSPACE} / ${BUILD_PATH} /libpgcore.a ]
92
+ if $WASI
89
93
then
90
- echo " found postgres core static libraries in ${WORKSPACE} / ${BUILD_PATH} "
94
+ echo " TODO: wasi post link "
91
95
else
92
- echo " failed to build libpgcore static at ${WORKSPACE} /postgresql-${PG_BRANCH} /${BUILD_PATH} /libpgcore.a"
93
- exit 85
94
- fi
95
96
96
- if $LOCAL
97
- then
98
- cp -f pglite/packages/pglite/dist/* .tar.gz $PG_DIST_WEB /
99
- cp -f pglite/packages/pglite/dist/pglite.* $PG_DIST_WEB /
100
- mv -v pglite/packages/pglite/release/pglite.html $PG_DIST_WEB /
101
- echo " TODO: start test server"
102
- else
103
- # gh pages
104
- mkdir -p /tmp/web
105
- cp -f pglite/packages/pglite/dist/* .tar.gz /tmp/web/
106
- cp -f pglite/packages/pglite/dist/pglite.* /tmp/web/
107
- mv -v pglite/packages/pglite/release/pglite.html /tmp/web/index.html
108
- fi
97
+ if [ -f ${WORKSPACE} /${BUILD_PATH} /libpgcore.a ]
98
+ then
99
+ echo " found postgres core static libraries in ${WORKSPACE} /${BUILD_PATH} "
100
+ else
101
+ echo " failed to build libpgcore static at ${WORKSPACE} /postgresql-${PG_BRANCH} /${BUILD_PATH} /libpgcore.a"
102
+ exit 85
103
+ fi
109
104
105
+ if $LOCAL
106
+ then
107
+ cp -f pglite/packages/pglite/dist/* .tar.gz $PG_DIST_WEB /
108
+ cp -f pglite/packages/pglite/dist/pglite.* $PG_DIST_WEB /
109
+ mv -v pglite/packages/pglite/release/pglite.html $PG_DIST_WEB /
110
+ echo " TODO: start test server"
111
+ else
112
+ # gh pages
113
+ mkdir -p /tmp/web
114
+ cp -f pglite/packages/pglite/dist/* .tar.gz /tmp/web/
115
+ cp -f pglite/packages/pglite/dist/pglite.* /tmp/web/
116
+ mv -v pglite/packages/pglite/release/pglite.html /tmp/web/index.html
117
+ fi
118
+ fi
0 commit comments