Skip to content

Commit

Permalink
Properly handle tags for release builds
Browse files Browse the repository at this point in the history
  • Loading branch information
Daniel15 committed Dec 2, 2016
1 parent 44842e4 commit d6e26fe
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion nightly/lib/AppVeyor.php
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,10 @@ public static function getArtifactsForJob($job_id) {

public static function validateBuild($build, $project) {
if (
($build->branch !== Config::BRANCH && !Str::endsWith($build->branch, Config::RELEASE_BRANCH_SUFFIX)) ||
(
$build->branch !== Config::BRANCH &&
!preg_match(Config::RELEASE_TAG_FORMAT, $build->branch)
) ||
$project->repositoryName !== Config::ORG_NAME.'/'.Config::REPO_NAME
) {
api_response(sprintf(
Expand Down
2 changes: 1 addition & 1 deletion nightly/lib/config.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ class Config {
const ORG_NAME = 'yarnpkg';
const REPO_NAME = 'yarn';
const BRANCH = 'master';
const RELEASE_BRANCH_SUFFIX = '-stable';
const RELEASE_TAG_FORMAT = '/v[0-9]+(\.[0-9]+)*/';

const SIGN_AUTH_TOKEN = 'CHANGEME';
const GITHUB_TOKEN = 'CHANGEME';
Expand Down

0 comments on commit d6e26fe

Please sign in to comment.