-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathdrone_io.sh
executable file
·66 lines (50 loc) · 1.79 KB
/
drone_io.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
66
#!/usr/bin/env bash
set -o xtrace
git clone https://github.com/donny-dont/Pixelate-Flat.git ../pixelate-flat
pub get
# TODO: dartanalyzer on all libraries and main entry points in Pixelate
# Get library files
L1=$(ls lib/*.dart)
# Get component library files
L2=$(for r in $(ls -d lib/components/*) ; do echo ${r}/`basename $r`.dart; done)
# Join library files with component library files
R=$(for L in "${L1[@]}" "${L2[@]}" ; do echo "$L" ; done)
docgen --compile --package-root=./packages --no-include-sdk --include-private $R
rm dartdoc-viewer/client/out/web/packages
rm dartdoc-viewer/client/out/web/docs/packages
rm dartdoc-viewer/client/out/web/docs/Pixelate/packages
rm dartdoc-viewer/client/out/web/static/packages
rm dartdoc-viewer/client/out/web/static/js/packages
rm dartdoc-viewer/client/out/web/static/css/packages
# Stage doc files
mv dartdoc-viewer/client/out/packages dartdoc-viewer/client/out/web/packages
mv dartdoc-viewer/client/out/web ./.docs_staging
# TODO: run pub build web.. This will transform Pixelate and proper packages folder
pub build web
# Fix the paths in the built files
# TODO: Remove when https://code.google.com/p/dart/issues/detail?id=17596 is fixed
cd bin
dart --package-root=packages fix_paths.dart
cd ..
# Stage web files
cp -r build/web .web_staging
# Fetch origin
git fetch origin
# Get branches
git branch -v -a
# Delete any files that might still be around.
rm -rf *
# Copy docs up to GitHub gh-pages branch
git checkout --track -b gh-pages origin/gh-pages
# Delete any files that might still be around.
rm -rf *
# Unstage files
date > date.txt
cp -r .web_staging/* .
cp -r .docs_staging docs
rm -rf .docs_staging
rm -rf .web_staging
git add -A
git commit -m"auto commit from drone"
git remote set-url origin [email protected]:donny-dont/Pixelate.git
git push origin gh-pages