Skip to content

Commit

Permalink
chore: update base branch to main
Browse files Browse the repository at this point in the history
  • Loading branch information
shipjs committed Jun 16, 2020
1 parent 6543174 commit fdb7c32
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 22 deletions.
6 changes: 3 additions & 3 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -93,21 +93,21 @@ workflows:
filters:
branches:
only:
- master
- main
gh_pages:
jobs:
- gh_pages:
filters:
branches:
only:
- master
- main
prepare_release_every_tuesday:
triggers:
- schedule:
cron: "0 9 * * 2"
filters:
branches:
only:
- master
- main
jobs:
- prepare_release
10 changes: 0 additions & 10 deletions packages/shipjs-lib/src/lib/config/defaultConfig.js
Original file line number Diff line number Diff line change
Expand Up @@ -121,11 +121,6 @@ _This pull request is automatically generated by [Ship.js](https://github.com/al
prepared: ({ appName, version, pullRequestUrl }) => ({
pretext: `:writing_hand: The release for *${appName}@${version}* is prepared!`,
fields: [
{
title: 'Branch',
value: 'master',
short: true,
},
{
title: 'Version',
value: version,
Expand All @@ -148,11 +143,6 @@ _This pull request is automatically generated by [Ship.js](https://github.com/al
}) => ({
pretext: `:tada: Successfully released *${appName}@${version}*`,
fields: [
{
title: 'Branch',
value: 'master',
short: true,
},
{
title: 'Commit',
value: `*<${latestCommitUrl}|${latestCommitHash}>*`,
Expand Down
15 changes: 6 additions & 9 deletions ship.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,21 @@ module.exports = {
monorepo: {
mainVersionFile: "package.json",
packagesToBump: ["packages/*"],
packagesToPublish: ["packages/*"]
packagesToPublish: ["packages/*"],
},
versionUpdated: ({ version, dir, exec }) => {
// update lerna.json
updateJson(dir, "lerna.json", json => {
updateJson(dir, "lerna.json", (json) => {
json.version = version;
});

// update package.json
updateJson(dir, "package.json", json => {
updateJson(dir, "package.json", (json) => {
json.version = version;
});

// update dependency
updateJson(dir, "packages/shipjs/package.json", json => {
updateJson(dir, "packages/shipjs/package.json", (json) => {
json.dependencies["shipjs-lib"] = version;
});

Expand All @@ -40,17 +40,14 @@ module.exports = {
exec("cp README.md packages/shipjs/");
},
testCommandBeforeRelease: () => 'echo "No test before release"', // TODO: remove later
slack: {
releaseStart: null // TODO: remove later
},
// skip preparation if master contain only `chore` commits
// skip preparation if the patch update contains no fix
shouldPrepare: ({ releaseType, commitNumbersPerType }) => {
const { fix = 0 } = commitNumbersPerType;
if (releaseType === "patch" && fix === 0) {
return false;
}
return true;
}
},
};

const updateJson = (dir, fileName, fn) => {
Expand Down

0 comments on commit fdb7c32

Please sign in to comment.