mirror of
https://github.com/servo/servo.git
synced 2025-08-04 21:20:23 +01:00
Move Mako-related files into a new sub-directory.
There’s gonna be more of them.
This commit is contained in:
parent
b7eb720c74
commit
7787b21e30
8 changed files with 10 additions and 6 deletions
|
@ -3,6 +3,7 @@
|
||||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||||
|
|
||||||
use std::env;
|
use std::env;
|
||||||
|
use std::path::Path;
|
||||||
use std::process::{Command, exit};
|
use std::process::{Command, exit};
|
||||||
|
|
||||||
#[cfg(windows)]
|
#[cfg(windows)]
|
||||||
|
@ -29,9 +30,12 @@ fn find_python() -> String {
|
||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
let python = env::var("PYTHON").ok().unwrap_or_else(find_python);
|
let python = env::var("PYTHON").ok().unwrap_or_else(find_python);
|
||||||
|
let script = Path::new(file!()).parent().unwrap().join("properties").join("build.py");
|
||||||
let product = if cfg!(feature = "gecko") { "gecko" } else { "servo" };
|
let product = if cfg!(feature = "gecko") { "gecko" } else { "servo" };
|
||||||
let status = Command::new(python)
|
let status = Command::new(python)
|
||||||
.args(&["generate_properties_rs.py", product, "rust"])
|
.arg(&script)
|
||||||
|
.arg(product)
|
||||||
|
.arg("rust")
|
||||||
.status()
|
.status()
|
||||||
.unwrap();
|
.unwrap();
|
||||||
if !status.success() {
|
if !status.success() {
|
||||||
|
|
|
@ -59,7 +59,7 @@ def write_html(template):
|
||||||
)
|
)
|
||||||
_, html = render("properties.html.mako", properties=properties)
|
_, html = render("properties.html.mako", properties=properties)
|
||||||
|
|
||||||
doc_servo = os.path.join(BASE, "..", "..", "target", "doc", "servo")
|
doc_servo = os.path.join(BASE, "..", "..", "..", "target", "doc", "servo")
|
||||||
write(doc_servo, "css-properties.json", json.dumps(properties, indent=4))
|
write(doc_servo, "css-properties.json", json.dumps(properties, indent=4))
|
||||||
write(doc_servo, "css-properties.html", html)
|
write(doc_servo, "css-properties.html", html)
|
||||||
|
|
|
@ -12,7 +12,7 @@ cd "$(dirname $0)/../.."
|
||||||
# etc/doc.servo.org/index.html overwrites $(mach rust-root)/doc/index.html
|
# etc/doc.servo.org/index.html overwrites $(mach rust-root)/doc/index.html
|
||||||
cp etc/doc.servo.org/* target/doc/
|
cp etc/doc.servo.org/* target/doc/
|
||||||
|
|
||||||
python components/style/build_properties_rs.py servo html
|
python components/style/properties/build.py servo html
|
||||||
|
|
||||||
ghp-import -n target/doc
|
ghp-import -n target/doc
|
||||||
git push -qf https://${TOKEN}@github.com/servo/doc.servo.org.git gh-pages
|
git push -qf https://${TOKEN}@github.com/servo/doc.servo.org.git gh-pages
|
||||||
|
|
|
@ -41,9 +41,9 @@ fn main() {
|
||||||
let geckolib_dir = Path::new(file!()).parent().unwrap();
|
let geckolib_dir = Path::new(file!()).parent().unwrap();
|
||||||
let top_dir = geckolib_dir.join("..").join("..");
|
let top_dir = geckolib_dir.join("..").join("..");
|
||||||
|
|
||||||
let style_template = Path::new("components/style/properties.mako.rs");
|
let style_template = Path::new("components/style/properties/properties.mako.rs");
|
||||||
let geckolib_template = Path::new("ports/geckolib/properties.mako.rs");
|
let geckolib_template = Path::new("ports/geckolib/properties.mako.rs");
|
||||||
let mako = Path::new("components/style/Mako-0.9.1.zip");
|
let mako = Path::new("components/style/properties/Mako-0.9.1.zip");
|
||||||
|
|
||||||
let result = Command::new(python)
|
let result = Command::new(python)
|
||||||
.current_dir(top_dir)
|
.current_dir(top_dir)
|
||||||
|
|
|
@ -666,7 +666,7 @@ def check_css_properties_json(topdir):
|
||||||
os.remove(filename)
|
os.remove(filename)
|
||||||
subprocess.check_call([
|
subprocess.check_call([
|
||||||
sys.executable,
|
sys.executable,
|
||||||
path.join(topdir, "components", "style", "build_properties_rs.py"),
|
path.join(topdir, "components", "style", "properties", "build.py"),
|
||||||
"servo",
|
"servo",
|
||||||
"html",
|
"html",
|
||||||
])
|
])
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue