Runs the library build tasks, just copying files currently

@return  bool

@since   1.0
559974
public function run()
	{
		$this->say("Building library folder " . $this->libName);

		if (!file_exists($this->source))
		{
			$this->say("Folder " . $this->source . " does not exist!");

			return true;
		}

		$this->prepareDirectory();

		// Libaries are problematic.. we have libraries/name/libraries/name in the end for the build script
		$tar = $this->target;

		if (!$this->hasComponent)
		{
			$tar = $this->target . "/libraries/" . $this->libName;
		}

		$files = $this->copyTarget($this->source, $tar);

		$lib = $this->libName;

		// Workaround for libraries without lib_
		if (substr($this->libName, 0, 3) != "lib")
		{
			$lib = 'lib_' . $this->libName;
		}

		// Build media (relative path)
		$media = $this->buildMedia("media/" . $lib, $lib);
		$media->run();

		$this->addFiles('media', $media->getResultFiles());

		// Build language files for the component
		$language = $this->buildLanguage($lib);
		$language->run();

		// Copy XML
		$this->createInstaller($files);

		return true;
	}
467834
public function execute()
    {
        $curdir = getcwd();
        chdir($this->phpci->buildPath);

        $behat = $this->executable;

        if (!$behat) {
            $this->phpci->logFailure(Lang::get('could_not_find', 'behat'));

            return false;
        }

        $success = $this->phpci->executeCommand($behat . ' %s', $this->features);
        chdir($curdir);

        list($errorCount, $data) = $this->parseBehatOutput();

        $this->build->storeMeta('behat-warnings', $errorCount);
        $this->build->storeMeta('behat-data', $data);

        return $success;
    }
1035483
protected function doExecute()
    {
        $tmpFile = WINDWALKER_TEMP . '/offline';

        if ($this->offline) {
            File::write($tmpFile, 'off');
        } elseif (is_file($tmpFile)) {
            File::delete($tmpFile);
        }

        $this->out()->out($this->description);

        return true;
    }
1110248
protected function loadBuiltInTasks()
    {
        $finder = new Finder();
        $finder->files()->in(__DIR__ . '/BuiltIn')->name('*Task.php');

        /** @var SplFileInfo $file */
        foreach ($finder as $file) {
            $taskClass = substr('\\Mage\\Task\\BuiltIn\\' . str_replace('/', '\\', $file->getRelativePathname()), 0, -4);
            if (class_exists($taskClass)) {
                $reflex = new ReflectionClass($taskClass);
                if ($reflex->isInstantiable()) {
                    $task = new $taskClass();
                    if ($task instanceof AbstractTask) {
                        $this->add($task);
                    }
                }
            }
        }
    }
9975
public function execute()
    {
        if (!$this->isBucketAvailable()) {
            if (!$this->getCreateBuckets()) {
                throw new BuildException('Bucket doesn\'t exist and createBuckets not specified');
            }

            if (!$this->createBucket()) {
                throw new BuildException('Bucket cannot be created');
            }
        }

        // Filesets take precedence
        if (!empty($this->_filesets)) {
            $objects = [];

            foreach ($this->_filesets as $fs) {
                if (!($fs instanceof FileSet)) {
                    continue;
                }

                $ds = $fs->getDirectoryScanner($this->getProject());
                $objects = array_merge($objects, $ds->getIncludedFiles());
            }

            $fromDir = $fs->getDir($this->getProject())->getAbsolutePath();

            if ($this->_fileNameOnly) {
                foreach ($objects as $object) {
                    $this->_source = $object;
                    $this->saveObject(basename($object), $fromDir . DIRECTORY_SEPARATOR . $object);
                }
            } else {
                foreach ($objects as $object) {
                    $this->_source = $object;
                    $this->saveObject(
                        str_replace('\\', '/', $object),
                        $fromDir . DIRECTORY_SEPARATOR . $object
                    );
                }
            }

            return;
        }

        $this->saveObject($this->getObject(), $this->getSource());
    }
447618
public function run()
	{
		$this->say('Building component');

		// Analyize extension structure
		$this->analyze();

		// Prepare directories
		$this->prepareDirectories();

		if ($this->hasAdmin)
		{
			$adminFiles = $this->copyTarget($this->adminPath, $this->getBuildFolder() . "/administrator/components/com_" . $this->getExtensionName());

			$this->addFiles('backend', $adminFiles);
		}

		if ($this->hasFront)
		{
			$frontendFiles = $this->copyTarget($this->frontPath, $this->getBuildFolder() . "/components/com_" . $this->getExtensionName());

			$this->addFiles('frontend', $frontendFiles);
		}

		// Build media (relative path)
		$media = $this->buildMedia("media/com_" . $this->getExtensionName());
		$media->run();

		$this->addFiles('media', $media->getResultFiles());

		$language = $this->buildLanguage("com_matukio");
		$language->run();

		return true;
	}
288925
public function main()
    {
        $projectFilter = [
            'provider'   => $this->provider,
            'repository' => $this->repository,
            'result'     => ['success', 'warning']
        ];
        
        $projectFilter['state'] = $this->state ? : ['complete'];

        if ($this->reference) {
            $projectFilter['ref'] = $this->reference;
        }

        // Get the build list
        $builds = $this->getClient()->getBuilds($projectFilter);
        
        if (empty($builds['_embedded']['builds'])) {
            $message = 'No build found for the project "' . $this->provider . '/' . $this->repository . '"';
            if ($this->reference) {
                $message.= ' on the reference  "' . $this->reference . '"';
            }
            throw new \BuildException($message);
        }

        if ($this->destination) {
            // Get the package download url of the last build
            $package = $this->getClient()->downloadPackage([
                'provider' => $this->provider,
                'repository' => $this->repository,
                'buildId' => $builds['_embedded']['builds'][0]['buildId'],
                'packageType' => 'deploy',
                'destination' => $this->destination
            ]);
        } else {
            // Get the package download url of the last build
            $package = $this->getClient()->getPackage([
                'provider' => $this->provider,
                'repository' => $this->repository,
                'buildId' => $builds['_embedded']['builds'][0]['buildId'],
                'packageType' => 'deploy'
            ]);
        }
        
        if ($this->property) {
            $this->getProject()->setProperty($this->property, $package[$this->destination ? 'path' : 'url']);
        }
    }
1227440
public function run()
    {
        $old = explode(' ', $this->parameters['previous']);
        $new = explode(' ', $this->parameters['current']);
        $out = $this->parameters['output'];
        
        $diff = new taoDevTools_models_RdfDiff();
        foreach ($old as $file) {
            $diff->removeRdf($file);
        }
        foreach ($new as $file) {
            $diff->addRdf($file);
        }
        file_put_contents($out, $diff->exportDiffToSql());
    }
328633
public function build()
    {
        $files = $this->iterator->getFiles();
        $generators = $this->generatorRegistry->generators();

        foreach ($files as $file) {
            foreach ($generators as $generator) {
                $generator->parseFile($file);
            }
        }

        foreach ($generators as $generator) {
            $generator->generate();
        }
    }
348582
public function
	Build() {
	/*//
	compile the files down to the final form.
	//*/

		if($this->Print) {
			header(sprintf(
				"Content-type: %s",
				$this->GetFullContentType()
			));
		}

		$ds = DIRECTORY_SEPARATOR;
		$source = '';
		$filelist = $this->FindTheFiles();
		$outfile = sprintf(
			"%s{$ds}%s{$ds}%s",
			$this->OutputDir,
			$this->DistDir,
			$this->OutputFile
		);

		if($this->AddScriptHeader) $this->AppendScriptHeader(
			$filelist,
			$source
		);

		foreach($filelist as $filepath)
		$this->AppendFile($filepath,$source);

		if($this->OutputFile) {
			if(!$this->WriteToDisk($outfile,$source)) {
				echo $this->GetComment(
					$this->Print,
					"INFO: output was unchanged with this build.",
					$source
				);

				if($this->Print)
				echo PHP_EOL;
			}
		}

		if($this->Print) {
			echo $source, PHP_EOL;
		}

		return $this;
	}
1108168
public function main()
    {
        $pull = $this->getFactoryInstance('update');
        try {
            $pull->setBranch($this->getBranch());
        } catch (Exception $ex) {
            $this->log("Caught: " . $ex->getMessage(), Project::MSG_DEBUG);
        }
        $pull->setClean($this->getClean());
        $pull->setQuiet($this->getQuiet());

        $cwd = getcwd();

        if ($this->repository === '') {
            $prog = $this->getProject();
            $dir = $prog->getProperty('application.startdir');
        } else {
            $dir = $this->repository;
        }

        $this->checkRepositoryIsDirAndExists($dir);
        chdir($dir);
        try {
            $this->log("Executing: " . $pull->asString(), Project::MSG_INFO);
            $output = $pull->execute();
            if ($output !== '') {
                $this->log($output);
            }
        } catch (Exception $ex) {
            $msg = $ex->getMessage();
            $p = strpos($msg, 'hg returned:');
            if ($p !== false) {
                $msg = substr($msg, $p + 13);
            }
            chdir($cwd);
            throw new BuildException($msg);
        }
        chdir($cwd);
    }
686496
public function run()
	{
		$this->say('Zipping ' . $this->getJConfig()->extension . " " . $this->getJConfig()->version);

		// Instantiate the zip archive
		$this->zip->open($this->target, \ZipArchive::CREATE);

		// Process the files to zip
		foreach (new \RecursiveIteratorIterator(new \RecursiveDirectoryIterator($this->getBuildFolder()), \RecursiveIteratorIterator::SELF_FIRST) as $subfolder)
		{
			if ($subfolder->isFile())
			{
				// Set all separators to forward slashes for comparison
				$usefolder = str_replace('\\', '/', $subfolder->getPath());

				// Drop the folder part as we don't want them added to archive
				$addpath = str_ireplace($this->getBuildFolder(), '', $usefolder);

				// Remove preceding slash
				$findfirst = strpos($addpath, '/');

				if ($findfirst == 0 && $findfirst !== false)
				{
					$addpath = substr($addpath, 1);
				}

				if (strlen($addpath) > 0 || empty($addpath))
				{
					$addpath .= '/';
				}

				$options = array('add_path' => $addpath, 'remove_all_path' => true);
				$this->zip->addGlob($usefolder . '/*.*', GLOB_BRACE, $options);
			}
		}

		// Close the zip archive
		$this->zip->close();

		return true;
	}
946353
public function run()
	{
		$this->say('Uploading ' . $this->getJConfig()->extension . $this->getJConfig()->version . " via FTP");

		// Todo Move filepath and name to config
		$this->filename = $this->getExtensionName() . "-" . $this->getJConfig()->version . ".zip";
		$this->filepath = JPATH_BASE . "/dist/" . $this->filename;

		// Check if we have a package
		if (in_array("package", explode(" ", $this->getJConfig()->target)))
		{
			$this->target   = "package";
			$this->filename = "pkg-" . $this->getExtensionName() . "-" . $this->getJConfig()->version . ".zip";
			$this->filepath = JPATH_BASE . "/dist/" . $this->filename;
		}

		try
		{
			if ($this->getJConfig()->ftp->ssl == "true")
			{
				$con = ftp_ssl_connect($this->getJConfig()->ftp->host);
			}
			else
			{
				$con = ftp_connect($this->getJConfig()->ftp->host);
			}

			$login_result = ftp_login($con, $this->getJConfig()->ftp->user, $this->getJConfig()->ftp->password);

			// Set passive ftp
			ftp_pasv($con, true);

			if (!$login_result)
			{
				return Result::error($this, 'Failed logging in');
			}

			ftp_chdir($con, $this->getJConfig()->ftp->target);

			$this->say('Uploading ' . $this->filepath);

			if (!ftp_put($con, $this->filename, $this->filepath, FTP_BINARY))
			{
				return Result::error($this, 'Failed uploading package');
			}

			$this->say("Upload finished");
		}
		catch (\Exception $e)
		{
			return Result::error($this, 'Error: ' . $e->getMessage());
		}

		return true;
	}
191037
public function run()
    {
        $data       = $this->parseRequestUri();
        $controller = $data['controller'];
        $method     = $data['method'];
        $params     = $data['params'];

        $subModule  = $this->subModule;
        if ("" != $subModule) {
            $subModule = "\\" . $subModule;
        }

        $class      = sprintf("%s\\Controller%s\\%sController", $this->appNameSpace, $subModule, $controller);
        if (!(class_exists($class) && method_exists($class, $method))) {
            $this->fileNotFound();
        } else {
            $class  = new $class;
            $pipe = new Pipeline();
            $pipe->through($class->getMiddleWare())->then(function () use ($class, $method, $params) {
                call_user_func_array(array($class, $method), $params);
            });

            //call_user_func_array(array($class, $method), $params);
        }
    }
1243947
public function run()
    {
        $vendorDir = dirname(dirname(__FILE__));
        $baseDir = dirname($vendorDir);
        spl_autoload_register(function ($className) use($baseDir) {
            if (file_exists($file = $baseDir . '/database/seeds/' . $className . '.php')) {
                include($file);
                return true;
            }
        });

        $this->call([
            ModulesTableSeeder::class,
            PrivilegesTableSeeder::class,
            SettingsTableSeeder::class,
        ]);
    }
247431
protected function run()
    {
        $versionString = rtrim($this->readHeaderRaw(8));
        $subVersion = round($this->readHeader('f', 4), 2);

        $version = $this->getVersion($versionString, $subVersion);

        $analysis = new Version($this->rec, $versionString, $subVersion);
        $analysis->version = $version;

        $analysis->isTrial = in_array($version, $this->trialVersions);
        $analysis->isAoK = in_array($version, $this->aokVersions);
        $analysis->isUserPatch = in_array($version, $this->userpatchVersions);
        $analysis->isUserPatch15 = $version === Version::VERSION_USERPATCH15;
        $analysis->isHDEdition = in_array($version, $this->hdVersions);
        $analysis->isHDPatch4 = $analysis->isHDEdition && $subVersion >= 12.00;
        $analysis->isAoC = $analysis->isUserPatch || $analysis->isHDEdition ||
            in_array($version, $this->aocVersions);

        $analysis->isMgl = $analysis->isAoK;
        $analysis->isMgx = $analysis->isAoC;
        $analysis->isMgz = $analysis->isUserPatch;
        // FIXME Not sure if this is the correct cutoff point.
        //
        // test/recs/versions/mgx2_simple.mgx2
        //    has subVersion == 12.31
        // test/recs/versions/MP Replay v4.3 @2015.09.11 221142 (2).msx
        //    has subVersion == 12.34
        // So it's somewhere between those two.
        $analysis->isMsx = $subVersion >= 12.32;
        $analysis->isAoe2Record = $subVersion >= 12.36;

        return $analysis;
    }
495780
public function execute()
    {
        $path  = $this->phpci->buildPath;
        $build = $this->build;

        if ($this->directory == $path) {
            return false;
        }

        $filename = str_replace('%build.commit%', $build->getCommitId(), $this->filename);
        $filename = str_replace('%build.id%', $build->getId(), $filename);
        $filename = str_replace('%build.branch%', $build->getBranch(), $filename);
        $filename = str_replace('%project.title%', $build->getProject()->getTitle(), $filename);
        $filename = str_replace('%date%', date('Y-m-d'), $filename);
        $filename = str_replace('%time%', date('Hi'), $filename);
        $filename = preg_replace('/([^a-zA-Z0-9_-]+)/', '', $filename);

        $curdir = getcwd();
        chdir($this->phpci->buildPath);

        if (!is_array($this->format)) {
            $this->format = array($this->format);
        }

        foreach ($this->format as $format) {
            switch ($format) {
                case 'tar':
                    $cmd = 'tar cfz "%s/%s.tar.gz" ./*';
                    break;
                default:
                case 'zip':
                    $cmd = 'zip -rq "%s/%s.zip" ./*';
                    break;
            }

            $success = $this->phpci->executeCommand($cmd, $this->directory, $filename);
        }

        chdir($curdir);

        return $success;
    }