Jump to content

Version Updating


deth4uall

Recommended Posts

Ok, I have been working on a game and I am wanting to create a revision system for development and patching to new versions...

 

My game uses a revision like v1.3.4 as you will see if you visit the site, and my testing server uses v1.3.5.x due to it being one revision ahead and having subrevisions based on how far along I get...

 

I want to create a script that updates the server with the SQL queries placed in a file based on the current version. So on testing server it will update the database ONLY for SQL newer than v1.3.5.2 if the next version I uploaded is 1.3.5.3...

 

So far I made the version numbers broken down into arrays but I got stuck there...

$version = str_replace("v","",$this->version);
	$version_array = explode(".",$version);
	include ("ubo.updates.php");		
	$versionup = str_replace("v","",$version);
	$versionup_array = explode(".",$version);
	if (sizeof($version_array) > 3)
	{
		$tot = $version_array['0'];
		$major = $version_array['1'];
		$minor = $version_array['2'];
		$rev = $version_array['3'];
	}

This previous code goes into the user.class.php & the next code is what I have for ubo.updates.php:

<?php
//Change The Below Number As You Upload the system
$version = "1.3.5";
$sqlupdate['1']['3']['5']['1'] = "";
?>

Any help is appreciated and even pointers and hints will help... :P

Link to comment
https://forums.phpfreaks.com/topic/188729-version-updating/
Share on other sites

  • 2 weeks later...

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.