FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
processing-docs/generate/reference.php at master · processing/processing-docs · GitHub
processing
processing-docs
Repository navigation
Code
Issues
3
(3)
Pull requests
Actions
Projects
Wiki
Security and quality
Insights
Expand file tree
Breadcrumbs
processing-docs
/
generate
/
reference.php
Copy path
More file actions
More file actions
Latest commit
History
History
History
89 lines (62 loc) · 3.37 KB
Breadcrumbs
processing-docs
/
generate
/
reference.php
Copy path
File metadata and controls
89 lines (62 loc) · 3.37 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
<?php
require_once
(
'
../config.php
'
);
function
out
(
$
output
) {
$
htmlOutput
=
str_replace
(
"\n"
,
"
<br />
"
,
$
output
);
echo
"
<p>
$
htmlOutput
</p>
"
;
error_log
(
$
output
);
}
$
JAVA_HOME
=
"
/usr/local/jdk1.5.0_15
"
;
$
PATH
=
"
$
JAVA_HOME
/bin:/usr/local/bin:/usr/bin:/bin
"
;
putenv
(
"
JAVA_HOME=
$
JAVA_HOME
"
);
putenv
(
"
PATH=
$
PATH
"
);
$
benchmark_start
=
microtime_float
();
$
path
=
BASEDIR
;
//define('BASEDIR', dirname(__FILE__).'/');
// Pull latest processing/processing from GitHub
// Note that the Reference generate script needs this,
// just in case someone changed anything in the .java source files.
out
(
"
Pulling in latest changes from processing/processing/...
"
);
$
mainRepoPath
=
"{
$
path
}
../processing
"
;
$
shell_output
=
shell_exec
(
"
cd
$
mainRepoPath
&& /usr/bin/git pull https://github.com/processing/processing/ 2>&1
"
);
out
(
$
shell_output
);
out
(
"
---------------
"
);
// Pull latest processing/processing-sound from GitHub
// Note that the Reference generate script needs this,
// just in case someone changed anything in the .java source files.
out
(
"
Pulling in latest changes from processing/processing-sound/...
"
);
$
soundRepoPath
=
"{
$
path
}
../processing-sound
"
;
//$shell_output = shell_exec("cd $soundRepoPath && /usr/bin/git pull https://github.com/processing/processing-sound/ 2>&1");
// clone new processing-sound library from work-in-progress repository instead
$
shell_output
=
shell_exec
(
"
rm -rf
$
soundRepoPath
&& mkdir
$
soundRepoPath
&& cd
$
soundRepoPath
&& /usr/bin/git clone https://github.com/processing/processing-sound.git . 2>&1
"
);
out
(
$
shell_output
);
out
(
"
---------------
"
);
// Pull latest processing/processing-docs from GitHub
// Disabled for now, so we can test generate scripts without pulling latest from repo. -SM
//out("<p>Pulling in latest changes from processing/processing-docs/...</p>");
//$docsRepoPath = "{$path}../processing-docs";
//$shell_output = shell_exec("cd $docsRepoPath && /usr/bin/git pull https://github.com/processing/processing-docs/ 2>&1");
//out($shell_output);
//out("---------------");
//Build reference files
out
(
"
Rebuilding reference files...
"
);
$
referencepath
=
$
path
.
"
java_generate/ReferenceGenerator/
"
;
$
shell_output
=
shell_exec
(
"
cd
$
referencepath
&& ./processingrefBuild.sh 2>&1
"
);
out
(
$
shell_output
);
// Compress distribution into a ZIP, so it can be rolled into an IDE build.
// processing/processing/java/
out
(
"
Compressing distribution directory...
"
);
shell_exec
(
"
rm
$
mainRepoPath
/build/shared/reference.zip 2>&1
"
);
//shell_exec("rm $mainRepoPath/java/reference.zip 2>&1"); // Add 10 Nov 2016 - CR
$
docsRepoPath
=
"{
$
path
}
../processing-docs
"
;
$
shell_output
=
shell_exec
(
"
cd
$
docsRepoPath
&& cp -r distribution/
$
mainRepoPath
/build/shared/reference/ 2>&1
"
);
//$shell_output = shell_exec("cd $docsRepoPath && cp -r distribution/ $mainRepoPath/java/reference/ 2>&1"); // Add 10 Nov 2016 - CR
out
(
$
shell_output
);
$
shell_output
=
shell_exec
(
"
cd
$
mainRepoPath
/build/shared/ && zip -r reference.zip reference/ 2>&1
"
);
//$shell_output = shell_exec("cd $mainRepoPath/java/ && zip -r reference.zip reference/ 2>&1"); // Add 10 Nov 2016 - CR
out
(
$
shell_output
);
shell_exec
(
"
rm -r
$
mainRepoPath
/build/shared/reference/ 2>&1
"
);
//shell_exec("rm -r $mainRepoPath/java/reference/ 2>&1"); // Add 10 Nov 2016 - CR
out
(
"
Done compressing!
"
);
$
benchmark_end
=
microtime_float
();
$
execution_time
=
round
(
$
benchmark_end
-
$
benchmark_start
,
4
);
out
(
"
Generated files in
$
execution_time
seconds.
"
);
?>
Back
|
FazBrowse Home
|
New Git URL