Skip to content

Commit

Permalink
Updated channel name to replace with -
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinshahfws committed Nov 10, 2023
1 parent 64a79df commit 1508ff2
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 10 deletions.
5 changes: 2 additions & 3 deletions .github/workflows/release-github.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ jobs:
GITHUB_TOKEN: ${{ secrets.SEMANTIC_RELEASE_BOT_PAT }} # <-- Allows semantic-release-bot to push changes to protected branches
npm_config_tag: ${{ env.NPM_DIST_TAG }} # <-- For main, this is `latest.` Otherwise, `next`, `next-major`, etc. See ./.releaserc for release branch config.
run: npx semantic-release --dry-run
- name: Build artifacts for PRs
- name: Build artifacts for feature branches
if: github.ref_name != 'main' && github.ref_name != 'next'
run: |
npm version prerelease --preid $RELEASE_CHANNEL --workspaces --git-tag-version false
Expand All @@ -82,7 +82,6 @@ jobs:
files: "./src/sdks/core/dist/lib/firebolt.mjs"
- name: Release Firebolt SDKs to NPM
if: steps.check_build.outputs.files_exists == 'true' && github.event_name != 'pull_request' && (github.ref_name != 'main' || github.event_name == 'workflow_dispatch')
# if: steps.check_build.outputs.files_exists == 'true' && (github.ref_name != 'main' || github.event_name == 'workflow_dispatch')
env:
NPM_TOKEN: ${{ secrets.SEMANTIC_RELEASE_NPM_TOKEN }} # <-- Allows semantic-release to publish to npm without 2 factor auth.
npm_config_tag: ${{ env.NPM_DIST_TAG }} # <-- For main, this is `latest.` Otherwise, `next`, `next-major`, etc. See ./.releaserc for release branch config.
Expand All @@ -105,7 +104,7 @@ jobs:
cd /tmp
git clone https://rdkcentral:[email protected]/rdkcentral/firebolt.git ./firebolt-docs
- name: Release docs to GitHub.io
if: (steps.check_build.outputs.files_exists == 'true' && github.event.pull_request.head.repo.full_name == 'rdkcentral/firebolt-apis')
if: steps.check_build.outputs.files_exists == 'true'
env:
GITHUB_TOKEN: ${{ secrets.SEMANTIC_RELEASE_BOT_PAT }} # <-- Allows semantic-release-bot to push changes to protected branches
npm_config_tag: ${{ env.NPM_DIST_TAG }} # <-- For main, this is `latest.` Otherwise, `next`, `next-major`, etc. See ./.releaserc for release branch config.
Expand Down
6 changes: 0 additions & 6 deletions src/js/github.io/index.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -177,12 +177,6 @@ function channel(version) {
parts.shift()
const chnl = parts.join("-").split(".").shift()
return chnl
// if (['next', 'next-major', 'test'].includes(chnl)) {
// return chnl
// }
// else {
// return 'test'
// }
}
else {
return 'latest'
Expand Down
2 changes: 1 addition & 1 deletion src/js/version.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ else if (task === 'channel') {
.then(JSON.parse)

// default to 'test' channel if branch is unknown
const config = releaserc.branches.find(b => b.name === branch) || { channel: branch.split('/').pop() }
const config = releaserc.branches.find(b => b.name === branch) || { channel: branch.replace('/', '-').pop() }
const channel = config.channel || (!config.prerelease ? 'latest' : config.name)

// return the configured channel name for the branch, otherwise return the branch name, unless it's the main branch, then return 'latest'
Expand Down

0 comments on commit 1508ff2

Please sign in to comment.