Creates the build history.

@return build history
961956
@Override
    protected BuildHistory createBuildHistory() {
        AbstractBuild<?, ?> lastFinishedBuild = getLastFinishedBuild();
        if (lastFinishedBuild == null) {
            return new NullBuildHistory();
        }
        else {
            return createHistory(lastFinishedBuild);
        }
    }
1019831
public function build()
    {
        $job = new JobDetail();

//        $job->setJobClass($this->jobClass);

        if(null == $this->key) {
            $this->key = new Key(Key::createUniqueName(null), null);
        }

        $job->setKey($this->key);
        $job->setDescription($this->description);
        $job->setDurable($this->durability);
//        $job->setRequestsRecovery($this->shouldRecover);
        $job->setJobClass($this->jobClass);
        $job->setJobDataMap($this->jobDataMap);

        return $job;
    }
1024907
public function build()
    {
        $this->readConfigs();

        $files = $this->getSiteFiles();

        $otherFiles = array_filter($files, function ($file) {
            return ! str_contains($file->getRelativePath(), '_blog');
        });

        if (@$this->configs['enableBlog']) {
            $blogPostsFiles = array_filter($files, function ($file) {
                return str_contains($file->getRelativePath(), '_blog');
            });

            $this->readBlogPostsData($blogPostsFiles);
        }

        $this->buildViewsData();

        $this->filesystem->cleanDirectory(KATANA_PUBLIC_DIR);

        if ($this->forceBuild) {
            $this->filesystem->cleanDirectory(KATANA_CACHE_DIR);
        }

        $this->handleSiteFiles($otherFiles);

        if (@$this->configs['enableBlog']) {
            $this->handleBlogPostsFiles($blogPostsFiles);
            $this->buildBlogPagination();
            $this->buildRSSFeed();
        }
    }
1224166
protected function createMigrationHistoryTable()
    {
        $tableName = $this->db->schema->getRawTableName($this->migrationTable);
        $this->stdout("Creating migration history table \"$tableName\"...", Console::FG_YELLOW);
        $this->db->createCommand()->createTable($this->migrationTable, [
            'version'    => 'VARCHAR(180) NOT NULL PRIMARY KEY',
            'apply_time' => 'INTEGER',
        ])->execute();
        $this->db->createCommand()->insert($this->migrationTable, [
            'version' => self::BASE_MIGRATION,
            'apply_time' => time(),
        ])->execute();
        $this->stdout("Done.\n", Console::FG_GREEN);
    }
53343
public RunList<R> newBuilds() {
        GregorianCalendar cal = new GregorianCalendar();
        cal.add(Calendar.DAY_OF_YEAR, -7);
        final long t = cal.getTimeInMillis();

        // can't publish on-going builds
        return filter(new Predicate<R>() {
            public boolean apply(R r) {
                return !r.isBuilding();
            }
        })
        // put at least 10 builds, but otherwise ignore old builds
        .limit(new CountingPredicate<R>() {
            public boolean apply(int index, R r) {
                return index < 10 || r.getTimeInMillis() >= t;
            }
        });
    }
1197307
public function build()
    {
        foreach ($this->timers as $marker => $timer) {
            $this->markers[$marker] = $timer->time();
        }
        arsort($this->markers);
        return $this->markers;
    }
391528
public function actionHistory()
    {
        $builder = new CommandBuilder();
        $hash = \Yii::$app->request->get('c');
        $pathToJson = $this->module->swaggerPath;


        // set executable external!!!
        // @chmod(__DIR__ . '/../ansi2html.sh', 0755);

        if ($hash && preg_match('#[a-z0-9]{4,40}#', $hash)) {
            $commands = [];
            $commands[] = $builder->setCommand(new Command('cd'))
                ->addArgument(new Argument(dirname($pathToJson)))
                ->build();

            $commands[] = $builder->setCommand(new Command('git'))
                ->addArgument(new Argument('log'))
                ->addFlag(new Flag('--color'))
                ->addFlag(new Flag('-p'))
                ->addFlag(new Flag('-1'))
                ->addArgument(new Argument($hash))
                ->addFlag(new Flag('--'))
                ->addArgument(new Argument('./' . basename($pathToJson)))
                ->build();

            $result = shell_exec(implode('; ', $commands) . ' | ' . __DIR__ . '/../ansi2html.sh');
            echo $result;
            \Yii::$app->end();
        }

        $format = '<tr class="log-item">';
        $format .= '<td class="log-hash">%h</td>';
        $format .= '<td class="log-date">%ad</td>';
        $format .= '<td class="log-short-comment">%s</td>';
        $format .= '<td class="log-full-comment">%b</td>';
        $format .= '</tr>';

        $commands = [];

        $commands[] = $builder->setCommand(new Command('cd'))
            ->addArgument(new Argument(dirname($pathToJson)))
            ->build();

        $commands[] = $builder->setCommand(new Command('git'))
            ->addArgument(new Argument('log'))
            ->addFlag(new Flag('--color'))
            ->addOption(new Option('--pretty', 'format:' . $format))
            ->addFlag(new Flag('--no-merges'))
            ->addFlag(new Flag('-10'))
            ->addFlag(new Flag('--'))
            ->addArgument(new Argument('./' . basename($pathToJson)))
            ->build();
        echo '<table>';
        echo stripslashes(shell_exec(implode('; ', $commands)));
        echo '</table>';
        \Yii::$app->end();
    }
142859
public Deployment build()
   {
      return new DeploymentImpl(identifier, name, archive, classLoader,
                                metadata, activation,
                                resourceAdapter, getConnectionFactories(), getAdminObjects(), classLoaderPlugin);
   }
1049564
public function build() {
    $options_data = $this->buildOptionsData();

    $out_text = 
      $this->buildUsageLine($this->arguments_spec->getUsage(), $options_data);

    $options_text = '';
    if ($options_data['lines']) {
      foreach($options_data['lines'] as $option_line_data) {
        $options_text .= $this->buildOptionLine($option_line_data, $options_data)."\n";
      }

      $out_text .= 
        "\n".
        ConsoleFormat::applyformatToText('bold','cyan','Options:')."\n".
        $options_text;
    }

    return $out_text;
  }
156174
private function build() {
        $this->getAbstractClass()->setDocumentation($this->getComment());
        $this->getAbstractClass()->setName(ucfirst($this->getTableName()));
        $this->getAbstractClass()->addUse(
            $this->getConfiguration()->getRootNamespace()
            . '\Models\\' . $this->getConfiguration()->getModelSubNamespace()
            . '\Base'
        );
        $this->getAbstractClass()->addUse('Bullhorn\FastRest\Api\Models\GeneratedInterface');
        $this->getAbstractClass()->setImplements(['GeneratedInterface']);
        $this->getAbstractClass()->setNamespace(
            $this->getConfiguration()->getRootNamespace()
            . '\Models\\' . $this->getConfiguration()->getModelSubNamespace()
            . '\Generated'
        );
        $this->getAbstractClass()->addUse(
            $this->getConfiguration()->getRootNamespace()
            . '\Models\\' . $this->getConfiguration()->getModelSubNamespace()
            . '\\' . ucfirst($this->getTableName()) . ' as ChildModel'
        );
        $this->getAbstractClass()->setExtends('Base');
        $this->getAbstractClass()->setAbstract(true);
        $this->buildIdField();

        $this->buildEnumConstants();

        $this->buildInitialize();
        $this->buildFieldsTypes();
        $this->buildVariableDefinitions();
        $this->buildOnConstruct();

        $this->buildGetSource();
        $this->buildAddJoin();

        $this->buildFindFirst();
        $this->buildFind();

        $this->buildGettersAndSetters();
        $this->buildRelationshipGetters();
        $this->buildColumnMap();
        $this->buildRelationshipsList();
    }
982619
public function build()
    {
        if (isset($this->style)) {
            return $this->style;
        }

        $this->style = BuildUtil::removeNullElements([
            'backgroundColor' => $this->backgroundColor,
            'separator' => $this->separator,
            'separatorColor' => $this->separatorColor,
        ]);

        return $this->style;
    }
1082049
public Description build() {
        if (null == name) {
            throw new IllegalStateException("name is not set");
        }
        final String title1 = null != title ? title : name;
        final List<Property> properties1 = buildProperties();
        final Map<String, String> mapping1 = Collections.unmodifiableMap(mapping);
        final Map<String, String> mapping2 = Collections.unmodifiableMap(fwkmapping);
        final Map<String, String> metadata2 = Collections.unmodifiableMap(metadata);
        return new Description() {
            @Override
            public String getName() {
                return name;
            }

            @Override
            public String getTitle() {
                return title1;
            }

            @Override
            public String getDescription() {
                return description;
            }

            @Override
            public List<Property> getProperties() {
                return properties1;
            }

            @Override
            public Map<String, String> getPropertiesMapping() {
                return mapping1;
            }

            @Override
            public Map<String, String> getFwkPropertiesMapping() {
                return mapping2;
            }

            @Override
            public Map<String, String> getMetadata() {
                return metadata2;
            }

            @Override
            public String toString() {
                return "PropertyDescription{" +
                        "name = " + getName() + ", " +
                        "title = " + getTitle() + ", " +
                        "description = " + getDescription() + ", " +
                        "properties = " + getProperties() + ", " +
                        "mapping = " + getPropertiesMapping() +
                        "frameworkMapping = " + getFwkPropertiesMapping() +
                        "metadata = " + metadata2 +
                        "}";
            }
        };
    }
505355
public Counter build()
	{
		return new Counter(this.getName(), this.getDescription(), this.getNumShards(),
			this.getCounterStatus(), this.getCount(), this.getIndexes(), this.getCreationDateTime());
	}
218145
public function getLastBuild()
    {
        if ($this->lastBuild == null) {
            $build = new self($this->getEngine(), $this->getProject());

            return $build;
        }

        return $this->lastBuild;
    }
1137463
public Request<T> build()
    {
        MultiMap headers = resolveHeaders();
        MultiMap parameters = resolveParameters();

        parameters.add("version",Integer.toString(version));

        Request<T> request = new Request<T>();
        request.setEntityName(entityName);
        request.setEntityType(objectType);
        request.setHeaders(headers);
        request.setParameters(parameters);

        return request;
    }
47986
public function getBuild()
    {
        $key = $this->getBuildId();

        if (empty($key)) {
            return null;
        }

        $cacheKey   = 'Cache.Build.' . $key;
        $rtn        = $this->cache->get($cacheKey, null);

        if (empty($rtn)) {
            $rtn    = Factory::getStore('Build', 'PHPCI')->getById($key);
            $this->cache->set($cacheKey, $rtn);
        }

        return $rtn;
    }
141665
public function build()
	{
		switch ($this->type) {
			case 'asset':
				return $this->getBuildAsset();
				break;

			case 'page':
				return $this->getBuildPage();
				break;

			case 'post':
				return $this->getBuildPost();
				break;

			case 'category':
				return $this->getBuildCategory();
				break;

			case 'pagination':
				return $this->getBuildPagination();
				break;

			case 'author':
				return $this->getBuildAuthor();
				break;

			case 'site':
				return new BuildSite($this->config, $this->getBuildAsset(), $this->getBuildPage(), $this->getBuildPost(), $this->getBuildCategory(), $this->getBuildPagination(), $this->getBuildAuthor() );
				break;
			
			default:
				return;
				break;
		}
	}