Skip to content

Commit

Permalink
vx: prevent release on no disallowed branches
Browse files Browse the repository at this point in the history
  • Loading branch information
ealush committed Jan 11, 2022
1 parent 65cd1a6 commit d03550c
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion vx/commands/release.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,21 @@ const logger = require('vx/logger');
const packagesToRelease = require('vx/scripts/release/packagesToRelease');
const releasePackage = require('vx/scripts/release/releasePackage');
const { isReleaseBranch } = require('vx/util/taggedBranch');
const { targetPackage } = require('vx/util/taggedBranch');
const {
targetPackage,
branchAllowsRelease,
CURRENT_BRANCH,
} = require('vx/util/taggedBranch');
const { usePackage } = require('vx/vxContext');
const ctx = require('vx/vxContext');
require('../scripts/genTsConfig');

function release() {
if (!branchAllowsRelease) {
logger.info(`❌ Branch ${CURRENT_BRANCH} does not allow release. Exiting`);
return;
}

const pkg = usePackage() || targetPackage;
if (pkg) {
return ctx.withPackage(pkg, releasePackage);
Expand Down

1 comment on commit d03550c

@vercel
Copy link

@vercel vercel bot commented on d03550c Jan 11, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.