-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathbuild.sh
executable file
·65 lines (50 loc) · 1.69 KB
/
build.sh
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
#!/bin/sh -e
repl() { printf -- "$1"'%.s' $(eval "echo {1.."$(($2))"}"); }
title() {
title=$1
echo ""
echo ""
echo "=========================================================================================="
echo $title
repl "- " $((${#title}/2+1))
echo ""
}
rm -rf dist build
title "Copy Change Log:"
cp -v projects/spotfire-wrapper/CHANGELOG.md CHANGELOG.md
title "Install dependencies:"
npm install
title "Lint code:"
ng lint
title "[spotfire-wrapper] Build the NPM package:"
./node_modules/.bin/ng build spotfire-wrapper --configuration production
(cd projects/spotfire-wrapper/ ; npm run build)
title "[spotfire-wrapper] Create a tarball for the package:"
(cd build/spotfire-wrapper/ ; npm pack)
mkdir -p dist
cp -f build/spotfire-wrapper/*.tgz dist/spotfire-wrapper.tgz
title "[spotfire-wrapper-lib] Install the NPM package from dist"
npm install /opt/tibco/users/spotfire-wrapper/dist/spotfire-wrapper.tgz --no-save
title "[spotfire-wrapper-lib] Build the WebElement Library:"
npm run build:elements
title "[spotfire-wrapper-lib] Test Schematics "
set +e
(cd /tmp ;
\rm -rf testapp ;
ng new testapp --minimal --defaults ;
cd testapp ;
npm install @angular/cdk@11 ;
ng add @tibco/spotfire-wrapper@latest )
title "Publish to npmjs.com (instructions)"
echo " $ ./build.sh"
echo " $ npm login"
echo " $ (cd build/spotfire-wrapper; npm publish)"
title "Publish to GiHub Packages (instructions)"
echo " -> open projects/spotfire-wrapper"
echo ' -> replace "name": "@tibco/spotfire-wrapper", with "name": "@TIBCOSoftware/spotfire-wrapper"'
echo " $ ./build.sh"
echo " $ npm login"
echo " $ npm publish build/spotfire-wrapper --access public"
echo ""
echo "That's all folks!"
exit 0