Skip to content
This repository was archived by the owner on Jul 30, 2025. It is now read-only.

Commit ab56847

Browse files
myan9starpit
authored andcommitted
feat: publish kui-base electron distributions
Fixes #2939
1 parent c17c1e6 commit ab56847

File tree

2 files changed

+38
-3
lines changed

2 files changed

+38
-3
lines changed

packages/builder/dist/publishers/s3/publish.sh

Lines changed: 31 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,13 @@
1616
# limitations under the License.
1717
#
1818

19-
set -e
20-
set -o pipefail
19+
# set -e
20+
# set -o pipefail
2121

2222
SCRIPTDIR=$(cd $(dirname "$0") && pwd)
2323
TOPDIR="$SCRIPTDIR"/../../../../../
2424
DISTDIR="$TOPDIR"/clients/default/dist
25+
BASE_DISTDIR="$TOPDIR"/clients/base/dist
2526

2627
BRANCH=${BRANCH-`git rev-parse --abbrev-ref HEAD`}
2728
echo "Building and deploying to this release stream: $BRANCH"
@@ -39,6 +40,7 @@ if [ "$BRANCH" != "master" ]; then
3940
(cd "$TOPDIR/packages/core" && npm version $VERSION) # smash this into packages/core/package.json
4041
(cd "$TOPDIR/node_modules/@kui-shell/settings" && npm version $VERSION) # smash this into @kui-shell/settings/package.json
4142
(cd "$TOPDIR/clients/default" && npm version $VERSION) # smash this into clients/default/package.json
43+
(cd "$TOPDIR/clients/base" && npm version $VERSION) # smash this into clients/base/package.json
4244

4345
COS_BUCKET=$BRANCH # stash the builds in a bucket named by the branch
4446

@@ -59,7 +61,11 @@ fi
5961
echo "Version after publish: $VERSION"
6062
echo "Storing builds in this bucket: $COS_BUCKET"
6163

62-
# 2. build the platform binary bundles
64+
65+
# 2.1 install the dependencies of kui-base
66+
(cd "$TOPDIR"/clients/base && npm install)
67+
68+
# 2.2 build the platform binary bundles
6369
if [ -z $PLATFORM ]; then
6470
if [[ `uname` == Linux ]]; then
6571
echo "Building Linux, Windows and Headless distributions from Linux host"
@@ -68,16 +74,27 @@ if [ -z $PLATFORM ]; then
6874
(cd "$TOPDIR"/clients/default && npm run build:headless)
6975
echo "confirming what we built for headless:"
7076
ls "$DISTDIR/headless"
77+
78+
echo "Kui-base: Building Linux, Window distributions from Linux host"
79+
(cd "$TOPDIR"/clients/base && npm run build:electron linux)
80+
(cd "$TOPDIR"/clients/base && npm run build:electron windows)
81+
7182
elif [[ `uname` == Darwin ]]; then
7283
echo "Building macOS distributions from macOS host"
7384
(cd "$TOPDIR"/clients/default && npm run build:electron darwin)
85+
86+
echo "Kui-base: Building macOS distributions from macOS host"
87+
(cd "$TOPDIR"/clients/base && npm run build:electron darwin)
7488
fi
7589
else
7690
echo "Building $PLATFORM distributions"
7791
(cd "$TOPDIR"/clients/default && npm run build:electron -- $PLATFORM)
7892
(cd "$TOPDIR"/clients/default && npm run build:headless)
7993
echo "confirming what we built for headless:"
8094
ls "$DISTDIR/headless"
95+
96+
echo "Kui-base: Building $PLATFORM distributions"
97+
(cd "$TOPDIR"/clients/base && npm run build:electron -- $PLATFORM)
8198
fi
8299

83100
echo "confirming what we built for electron:"
@@ -88,6 +105,7 @@ ls "$DISTDIR/electron"
88105
if [ -z "$NO_PUSH" ]; then
89106
BUILDDIR="$DISTDIR/headless" NO_CONFIG_UPDATE=true EXIST_OK=true node ./push-cos.js ${COS_BUCKET}
90107
BUILDDIR="$DISTDIR/electron" NO_CONFIG_UPDATE=true EXIST_OK=true node ./push-cos.js ${COS_BUCKET}
108+
BUILDDIR="$BASE_DISTDIR/electron" NO_CONFIG_UPDATE=true EXIST_OK=true node ./push-cos.js ${COS_BUCKET}
91109

92110
# deploy the local-proxy.html which lets us offer kui:// links in
93111
# unfriendly environs such as github markdown
@@ -97,13 +115,22 @@ if [ -z "$NO_PUSH" ]; then
97115

98116
if [[ `uname` == Linux ]]; then
99117
echo "win32: ${KUI_S3}/Kui-win32-x64.zip"
118+
echo "win32: ${KUI_S3}/Kui-base-win32-x64.zip"
119+
100120
echo "linux-zip: ${KUI_S3}/Kui-linux-x64.zip"
121+
echo "linux-zip: ${KUI_S3}/Kui-base-linux-x64.zip"
122+
101123
echo "linux-deb: ${KUI_S3}/Kui-linux-x64.deb"
124+
echo "linux-deb: ${KUI_S3}/Kui-base-linux-x64.deb"
125+
102126
echo "headless: ${KUI_S3}/Kui-headless.zip"
103127
echo "headless: ${KUI_S3}/Kui-headless.tar.bz2"
104128
elif [[ `uname` == Darwin ]]; then
105129
echo "macOS: ${KUI_S3}/Kui.dmg"
130+
echo "macOS: ${KUI_S3}/Kui-base.dmg"
131+
106132
echo "macOS-tar: ${KUI_S3}/Kui-darwin-x64.tar.bz2"
133+
echo "macOS-tar: ${KUI_S3}/Kui-base-darwin-x64.tar.bz2"
107134
fi
108135
fi
109136

@@ -112,4 +139,5 @@ if [ "$BRANCH" != "master" ]; then
112139
(cd "$TOPDIR"/packages/core && npm version $BASE_VERSION)
113140
(cd "$TOPDIR"/node_modules/@kui-shell/settings && npm version $BASE_VERSION)
114141
(cd "$TOPDIR/clients/default" && npm version $BASE_VERSION)
142+
(cd "$TOPDIR/clients/base" && npm version $BASE_VERSION)
115143
fi

packages/builder/dist/publishers/s3/push-cos.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ const {
1212
theme: { productName }
1313
} = require('../../../../../node_modules/@kui-shell/settings/config.json')
1414

15+
const kuiBaseName = 'Kui-base'
16+
1517
const version = process.argv[2]
1618

1719
const Bucket = process.env.S3_BUCKET || `kui-${version}`
@@ -24,6 +26,11 @@ const platformBuilds = [
2426
`${productName}-win32-x64.zip`,
2527
`${productName}.dmg`,
2628
`${productName}-darwin-x64.tar.bz2`,
29+
`${kuiBaseName}-linux-x64.deb`,
30+
`${kuiBaseName}-linux-x64.zip`,
31+
`${kuiBaseName}-win32-x64.zip`,
32+
`${kuiBaseName}.dmg`,
33+
`${kuiBaseName}-darwin-x64.tar.bz2`,
2734
`${productName}-headless.zip`,
2835
`${productName}-headless.tar.bz2`
2936
]

0 commit comments

Comments
 (0)