diff --git a/plugins/git-release-manager/src/components/index.tsx b/plugins/git-release-manager/src/components/index.tsx new file mode 100644 index 0000000000..2ce1edc6d2 --- /dev/null +++ b/plugins/git-release-manager/src/components/index.tsx @@ -0,0 +1,24 @@ +/* + * Copyright 2021 The Backstage Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +export { Differ } from './Differ'; +export { Divider } from './Divider'; +export { InfoCardPlus } from './InfoCardPlus'; +export { LinearProgressWithLabel } from './ResponseStepDialog/LinearProgressWithLabel'; +export { NoLatestRelease } from './NoLatestRelease'; +export { ResponseStepDialog } from './ResponseStepDialog/ResponseStepDialog'; +export { ResponseStepList } from './ResponseStepDialog/ResponseStepList'; +export { ResponseStepListItem } from './ResponseStepDialog/ResponseStepListItem'; diff --git a/plugins/git-release-manager/src/helpers/getBumpedTag.ts b/plugins/git-release-manager/src/helpers/getBumpedTag.ts index c368047635..dbfb00818e 100644 --- a/plugins/git-release-manager/src/helpers/getBumpedTag.ts +++ b/plugins/git-release-manager/src/helpers/getBumpedTag.ts @@ -21,6 +21,14 @@ import { Project } from '../contexts/ProjectContext'; import { SEMVER_PARTS } from '../constants/constants'; import { SemverTagParts } from './tagParts/getSemverTagParts'; +/** + * Calculates the next version for the project + * + * For calendar versioning this means a bump in patch + * + * For semantic versioning this means either a minor or a patch bump + * depending on the value of `bumpLevel` + */ export function getBumpedTag({ project, tag, @@ -74,6 +82,10 @@ function getBumpedSemverTag( }; } +/** + * Calculates the next semantic version, taking into account + * whether or not it's a minor or patch + */ export function getBumpedSemverTagParts( tagParts: SemverTagParts, semverBumpLevel: keyof typeof SEMVER_PARTS, diff --git a/plugins/git-release-manager/src/helpers/index.tsx b/plugins/git-release-manager/src/helpers/index.tsx new file mode 100644 index 0000000000..1516e192a1 --- /dev/null +++ b/plugins/git-release-manager/src/helpers/index.tsx @@ -0,0 +1,24 @@ +/* + * Copyright 2021 The Backstage Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +export { calverRegexp, getCalverTagParts } from './tagParts/getCalverTagParts'; +export { getBumpedSemverTagParts, getBumpedTag } from './getBumpedTag'; +export { getSemverTagParts, semverRegexp } from './tagParts/getSemverTagParts'; +export { getShortCommitHash } from './getShortCommitHash'; +export { getTagParts } from './tagParts/getTagParts'; +export { isCalverTagParts } from './isCalverTagParts'; +export { isProjectValid } from './isProjectValid'; +export { validateTagName } from './tagParts/validateTagName'; diff --git a/plugins/git-release-manager/src/helpers/tagParts/getTagParts.ts b/plugins/git-release-manager/src/helpers/tagParts/getTagParts.ts index acedf2e8d1..750e4e23c5 100644 --- a/plugins/git-release-manager/src/helpers/tagParts/getTagParts.ts +++ b/plugins/git-release-manager/src/helpers/tagParts/getTagParts.ts @@ -18,6 +18,10 @@ import { getCalverTagParts } from './getCalverTagParts'; import { getSemverTagParts } from './getSemverTagParts'; import { Project } from '../../contexts/ProjectContext'; +/** + * Tag parts are the individual parts of a version, e.g. .. + * are the parts of a semantic version + */ export function getTagParts({ project, tag, diff --git a/plugins/git-release-manager/src/index.ts b/plugins/git-release-manager/src/index.ts index 767dc5c6e1..5646a2f61a 100644 --- a/plugins/git-release-manager/src/index.ts +++ b/plugins/git-release-manager/src/index.ts @@ -18,4 +18,5 @@ export { gitReleaseManagerPlugin, GitReleaseManagerPage, gitReleaseManagerApiRef, + internals, } from './plugin'; diff --git a/plugins/git-release-manager/src/plugin.ts b/plugins/git-release-manager/src/plugin.ts index 511fd4b92e..943102f188 100644 --- a/plugins/git-release-manager/src/plugin.ts +++ b/plugins/git-release-manager/src/plugin.ts @@ -14,10 +14,6 @@ * limitations under the License. */ -import { gitReleaseManagerApiRef } from './api/serviceApiRef'; - -import { GitReleaseClient } from './api/GitReleaseClient'; -import { rootRouteRef } from './routes'; import { configApiRef, createPlugin, @@ -26,7 +22,19 @@ import { createRoutableExtension, } from '@backstage/core-plugin-api'; +import { GitReleaseClient } from './api/GitReleaseClient'; +import { gitReleaseManagerApiRef } from './api/serviceApiRef'; +import { rootRouteRef } from './routes'; +import * as constants from './constants/constants'; +import * as helpers from './helpers'; +import * as components from './components'; + export { gitReleaseManagerApiRef }; +export const internals = { + constants, + helpers, + components, +}; export const gitReleaseManagerPlugin = createPlugin({ id: 'git-release-manager',