Skip to content

Commit 7e4a9fe

Browse files
committed
Include git-pull.php in repo and build step
1 parent 080d951 commit 7e4a9fe

File tree

5 files changed

+102
-45
lines changed

5 files changed

+102
-45
lines changed

Gruntfile.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -243,6 +243,12 @@ module.exports = function(grunt) {
243243
src: ['**'],
244244
dest: '<%= config.dist %>/zh-Hans/reference'
245245
},
246+
gitDeploy: {
247+
expand: true,
248+
cwd: '<%= config.src %>',
249+
src: 'git-pull.php',
250+
dest: '<%= config.dist %>'
251+
},
246252
offlineReference: {
247253
files: [
248254
{

git-pull.php

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<?php
2+
echo system('git reset --hard');
3+
echo system('git checkout -- .');
4+
echo system('git pull git://github.com/processing/p5.js-website.git gh-pages');
5+
// date_default_timezone_set('America/New_York');
6+
// $date = getdate();
7+
// $date_str = $date['month'].' '.$date['mday'].', '.$date['year'];
8+
// $f = fopen('updated.php', 'w');
9+
// fwrite($f, $date_str);
10+
// fclose($f);
11+
// $f = fopen('site/updated.php', 'w');
12+
// fwrite($f, $date_str);
13+
// fclose($f);
14+
?>

src/git-pull.php

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<?php
2+
echo system('git reset --hard');
3+
echo system('git checkout -- .');
4+
echo system('git pull git://github.com/processing/p5.js-website.git gh-pages');
5+
// date_default_timezone_set('America/New_York');
6+
// $date = getdate();
7+
// $date_str = $date['month'].' '.$date['mday'].', '.$date['year'];
8+
// $f = fopen('updated.php', 'w');
9+
// fwrite($f, $date_str);
10+
// fclose($f);
11+
// $f = fopen('site/updated.php', 'w');
12+
// fwrite($f, $date_str);
13+
// fclose($f);
14+
?>

0 commit comments

Comments
 (0)