Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master' into ft_branding_page_…
Browse files Browse the repository at this point in the history
…variants

# Conflicts:
#	apps/console/scripts/populate-branding-i18n-defaults.js
  • Loading branch information
RushanNanayakkara committed May 7, 2024
2 parents a1f1b46 + fe00c55 commit 41428b0
Show file tree
Hide file tree
Showing 245 changed files with 28,588 additions and 17,008 deletions.
20 changes: 13 additions & 7 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ const getLicenseHeaderPattern = () => {
const LICENSE_HEADER_DEFAULT_PATTERN = [
"*",
{
pattern: " Copyright \\(c\\) \\b(2019|202[0-4])(?:-(202[0-4]))?, WSO2 LLC. \\(https://www.wso2.com\\)\.$",
pattern: " Copyright \\(c\\) \\b(2019|202[0-4])(?:-(202[0-4]))?, WSO2 LLC. \\(https://www.wso2.com\\).$",
template: " * Copyright (c) {{year}}, WSO2 LLC. (https://www.wso2.com)."
},
" *",
Expand Down Expand Up @@ -199,6 +199,12 @@ module.exports = {
"rules": {
"header/header": "off"
}
},
{
"files": [ "*.js" ],
"rules": {
"tsdoc/syntax": "off"
}
}
],
parserOptions: {
Expand Down Expand Up @@ -285,16 +291,16 @@ module.exports = {
name: "@oxygen-ui/react"
}
],
patterns: [
patterns: [
"@wso2is/**/dist/**",
"lodash/**",
"lodash/**",
"lodash/fp/**",
// prevents using absolute import paths such as "apps/console/src/**/*", "modules/react"
// TODO: show an error message in the editor when an absolute import is used[1]. Currently
// it's not working for some reason[2].
//
// [1] https://eslint.org/docs/latest/rules/no-restricted-imports#options:~:text=%22no%2Drestricted%2Dimports%22%3A%20%5B%22error%22%2C%20%7B%0A%20%20%20%20%22patterns,deprecated%2C%20except%20the%20modules%20in%20import2/good.%22%0A%20%20%20%20%7D%5D%0A%7D%5D
// [2] https://stackoverflow.com/questions/68126222/lint-rule-no-restricted-imports-throw-error-when-patterns-group-specified
//
// [1] https://eslint.org/docs/latest/rules/no-restricted-imports#group
// [2] https://stackoverflow.com/q/68126222/8810941
"apps/**/*",
"modules/**/*"
]
Expand Down Expand Up @@ -340,8 +346,8 @@ module.exports = {
return: "parens"
}
],
"react/no-danger": 2,
"react/no-children-prop": 0,
"react/no-danger": 2,
"react/prop-types": 1,
semi: 1,
"sort-imports": [
Expand Down
11 changes: 7 additions & 4 deletions .github/workflows/pr-builder.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ name: PR Builder

on:
pull_request:
types: [ opened, synchronize, labeled ]
branches: [ master ]
paths-ignore:
- "**.md"
Expand All @@ -21,11 +22,12 @@ env:
jobs:
lint:
name: ⬣ ESLint (STATIC ANALYSIS)
if: ${{ github.event_name == 'pull_request' || github.event.label.name == 'trigger-pr-builder' }}
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [ lts/* ]
pnpm-version: [ 8.7.4 ]
pnpm-version: [ latest ]
steps:
- name: ⬇️ Checkout
id: checkout
Expand Down Expand Up @@ -84,11 +86,12 @@ jobs:

typecheck:
name: ʦ Typecheck (STATIC ANALYSIS)
if: ${{github.event.label.name == 'trigger-pr-builder' || github.event_name == 'pull_request'}}
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [ lts/* ]
pnpm-version: [ 8.7.4 ]
pnpm-version: [ latest ]
steps:
- name: ⬇️ Checkout
id: checkout
Expand Down Expand Up @@ -148,7 +151,7 @@ jobs:
strategy:
matrix:
node-version: [ lts/* ]
pnpm-version: [ 8.7.4 ]
pnpm-version: [ latest ]
steps:
- name: ⬇️ Checkout
id: checkout
Expand Down Expand Up @@ -208,7 +211,7 @@ jobs:
node-version: [ lts/* ]
maven-version: [ 3.8.6 ]
java-version: [ 1.8 ]
pnpm-version: [ 8.7.4 ]
pnpm-version: [ latest ]
steps:
- name: ⬇️ Checkout
id: checkout
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ jobs:
node-version: [lts/*]
maven-version: [3.8.6]
java-version: [1.8]
pnpm-version: [8.7.4]
pnpm-version: [latest]
steps:
- name: ⬇️ Checkout
id: checkout
Expand Down Expand Up @@ -181,4 +181,4 @@ jobs:
working-directory: .github/workflows
run: |
PACKAGES="${{ toJson(steps.changesets.outputs.publishedPackages) }}"
bash ./scripts/release.sh "$PACKAGES" ${{ github.run_number }}
bash ./scripts/release.sh "$PACKAGES" ${{ github.run_number }} ${{ env.IS_HOTFIX }}
50 changes: 50 additions & 0 deletions .github/workflows/scripts/release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ SCRIPT_LOCATION="$(cd "$(dirname "${BASH_SOURCE[0]}")" &>/dev/null && pwd)"
PACKAGES=$1
# The GitHub Action run number.
GITHUB_RUN_NUMBER=$2
# Variable to determine whether the current release is a hotfix
IS_HOTFIX=$3
# The release branch name.
RELEASE_BRANCH=release-action-$GITHUB_RUN_NUMBER

Expand All @@ -46,6 +48,22 @@ process_console_package() {
return 0
fi

if [ "$IS_HOTFIX" = "true" ]; then
echo "Hotfix detected. Publishing the package as a hotfix."

search_tag=$tag-hotfix
echo "Search Tag: $search_tag"

hotfix_count=$(git tag | grep $search_tag | wc -l)
echo "Hotfix count: $hotfix_count"

next_hotfix_no=$((hotfix_count + 1))
echo "Next Hotfix number: $next_hotfix_no"

releaseVersion=$search_tag-$next_hotfix_no
echo "Hotfix release tag: $tag"
fi

goToRootDirectory &&
cd "apps/console/java" || exit 1 &&
echo "Releasing console version: $releaseVersion"
Expand All @@ -72,6 +90,22 @@ process_myaccount_package() {
return 0
fi

if [ "$IS_HOTFIX" = "true" ]; then
echo "Hotfix detected. Publishing the package as a hotfix."

search_tag=$tag-hotfix
echo "Search Tag: $search_tag"

hotfix_count=$(git tag | grep $search_tag | wc -l)
echo "Hotfix count: $hotfix_count"

next_hotfix_no=$((hotfix_count + 1))
echo "Next Hotfix number: $next_hotfix_no"

releaseVersion=$search_tag-$next_hotfix_no
echo "Hotfix release tag: $tag"
fi

goToRootDirectory &&
cd "apps/myaccount/java" || exit 1 &&
echo "Releasing myaccount version: $releaseVersion"
Expand All @@ -98,6 +132,22 @@ process_java_apps_package() {
return 0
fi

if [ "$IS_HOTFIX" = "true" ]; then
echo "Hotfix detected. Publishing the package as a hotfix."

search_tag=$tag-hotfix
echo "Search Tag: $search_tag"

hotfix_count=$(git tag | grep $search_tag | wc -l)
echo "Hotfix count: $hotfix_count"

next_hotfix_no=$((hotfix_count + 1))
echo "Next Hotfix number: $next_hotfix_no"

releaseVersion=$search_tag-$next_hotfix_no
echo "Hotfix release tag: $tag"
fi

goToRootDirectory &&
cd "identity-apps-core" || exit 1 &&
echo "Releasing identity-apps-core version: $releaseVersion"
Expand Down
1 change: 1 addition & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
strict-peer-dependencies=false
link-workspace-packages=true
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@ End-user apps in WSO2 Identity Server
1. Install NodeJS LTS(Latest Stable Version) from [https://nodejs.org/en/download/](https://nodejs.org/en/download/).
2. Install [pnpm](https://pnpm.io/).

> Note: Only PNPM v9 and above are supported.
```shell
corepack prepare pnpm@latest --activate
```
Expand Down
2 changes: 1 addition & 1 deletion apps/console/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright (c) 2020, WSO2 LLC. (https://www.wso2.com). All Rights Reserved.
* Copyright (c) 2020, WSO2 LLC. (https://www.wso2.com).
*
* WSO2 LLC. licenses this file to you under the Apache License,
* Version 2.0 (the "License"); you may not use this file except
Expand Down
Loading

0 comments on commit 41428b0

Please sign in to comment.