Permalink
Browse files

Fix for new folder structure of 0.4.0 release and GIT

  • Loading branch information...
1 parent f29c855 commit 4edfab3d17beecde1b1863a368591e15f44be5db @mikeho mikeho committed Oct 19, 2009
View
@@ -1 +1 @@
-/home/qcodo-api/wwwroot/includes
+/var/www/qcodo-api/includes
View
@@ -0,0 +1,20 @@
+UPDATE directory_token SET path='www/' WHERE token='__DOCROOT__';
+UPDATE directory_token SET path='cli/' WHERE token='__DEVTOOLS_CLI__';
+UPDATE directory_token SET path='includes/' WHERE token='__INCLUDES__';
+UPDATE directory_token SET path='includes/qcodo/' WHERE token='__QCODO__';
+UPDATE directory_token SET path='includes/qcodo/_core/' WHERE token='__QCODO_CORE__';
+UPDATE directory_token SET path='includes/data_classes/' WHERE token='__DATA_CLASSES__';
+UPDATE directory_token SET path='includes/data_classes/generated/' WHERE token='__DATAGEN_CLASSES__';
+UPDATE directory_token SET path='includes/formbase_classes_generated/' WHERE token='__FORMBASE_CLASSES__';
+UPDATE directory_token SET path='includes/panelbase_classes_generated/' WHERE token='__PANELBASE_CLASSES__';
+UPDATE directory_token SET path='www/_devtools/' WHERE token='__DEVTOOLS__';
+UPDATE directory_token SET path='www/drafts/' WHERE token='__FORM_DRAFTS__';
+UPDATE directory_token SET path='www/examples/' WHERE token='__EXAMPLES__';
+UPDATE directory_token SET path='www/assets/js/' WHERE token='__JS_ASSETS__';
+UPDATE directory_token SET path='www/assets/css/' WHERE token='__CSS_ASSETS__';
+UPDATE directory_token SET path='www/assets/images/' WHERE token='__IMAGE_ASSETS__';
+UPDATE directory_token SET path='www/assets/php/' WHERE token='__PHP_ASSETS__';
+UPDATE directory_token SET path='www/drafts/dashboard/' WHERE token='__PANEL_DRAFTS__';
+UPDATE directory_token SET path='includes/data_meta_controls/' WHERE token='__DATA_META_CONTROLS__';
+
+INSERT INTO directory_token VALUES(19, '__DATAGEN_META_CONTROLS__', 'includes/data_meta_controls/generated/', 0, 0);
@@ -15,8 +15,9 @@ class QBuildMaker extends QBaseClass {
protected $objDirectoryTokens;
const BuildRoot = '/var/qcodo_builds';
- const ManifestPath = '/wwwroot/includes/qcodo/_core/manifest.xml';
-
+ const ManifestPath = '/includes/qcodo/_core/manifest/manifest.xml';
+ const GitUrl = 'git://github.com/qcodo/qcodo.git';
+
public static function StripQuotes($strText) {
if (((QString::FirstCharacter($strText) == '"') && (QString::LastCharacter($strText) == '"')) ||
((QString::FirstCharacter($strText) == "'") && (QString::LastCharacter($strText) == "'"))) {
@@ -25,7 +26,7 @@ public static function StripQuotes($strText) {
return $strText;
}
-
+
public static function StripDollar($strText) {
if (QString::FirstCharacter($strText) == '$')
return substr($strText, 1);
@@ -57,21 +58,16 @@ public function __construct($intMajor, $intMinor, $intBuild, $blnStable) {
if (file_exists($this->strTemp))
print shell_exec("rm -r -f $this->strTemp");
- // Get the Latest Build
- if (SERVER_INSTANCE == 'prod')
- print shell_exec('cd ' . QBuildMaker::BuildRoot . '; cvs export -D "' . date('Y/m/d', time() + 24*60*60) . '" qcodo');
- else
- shell_exec('cd ' . QBuildMaker::BuildRoot . '; tar -xvf qcodo.tar');
+ // Get the Latest Build and Remove any GIT-related stuff
+ print shell_exec('cd ' . QBuildMaker::BuildRoot . '; git clone ' . QBuildMaker::GitUrl);
+ print shell_exec('cd ' . QBuildMaker::BuildRoot . '/qcodo; rm -r -f .git');
+ print shell_exec('cd ' . QBuildMaker::BuildRoot . '/qcodo; rm -r -f .gitignore');
// Move to Temp Location
rename(QBuildMaker::BuildRoot . '/qcodo', $this->strTemp);
- // Remove .cvsignore
- if (file_exists($this->strTemp . '/.cvsignore'))
- unlink($this->strTemp . '/.cvsignore');
-
// Check/Validate Version Number
- $strQcodoInc = file_get_contents($this->strTemp . '/wwwroot/includes/qcodo/_core/qcodo.inc.php');
+ $strQcodoInc = file_get_contents($this->strTemp . '/includes/qcodo/_core/qcodo.inc.php');
$strQcodoIncLines = explode("\n", $strQcodoInc);
$blnFound = false;
foreach ($strQcodoIncLines as $strLine) {
@@ -186,8 +182,10 @@ protected function ProcessFolder($strFolder) {
}
}
- if (!$intDirectoryId)
+ if (!$intDirectoryId) {
+ var_dump($this->objDirectoryTokens);
exit("FATAL ERROR: No DirectoryToken resolution for " . $strFile . "\r\n");
+ }
$objFile = File::LoadByDirectoryIdPath($intDirectoryId, $strFile);
if (!$objFile) {
@@ -70,7 +70,7 @@
// Constant for the DevTools (Command Line Interface) Directory
// (We're assuming it's at one level above __DOCROOT__... but feel free to specify any absolute path
- define ('__DEVTOOLS_CLI__', __DOCROOT__ . __SUBDIRECTORY__ . '/../_devtools_cli');
+ define ('__DEVTOOLS_CLI__', __DOCROOT__ . __SUBDIRECTORY__ . '/../cli');
@@ -27,7 +27,7 @@ public function __toString() {
return sprintf('Variable Object %s', $this->intId);
}
- public function CreateNewForName($strName, $strVersion) {
+ public static function CreateNewForName($strName, $strVersion) {
$objVariable = new Variable();
$objVariable->Name = $strName;
$objVariable->VariableTypeId = VariableType::Unknown;

0 comments on commit 4edfab3

Please sign in to comment.