Skip to content

Commit b433470

Browse files
authored
Merge pull request #40 from wednesday-solutions/dev
Dev
2 parents aee8a25 + c644b56 commit b433470

File tree

14 files changed

+489
-323
lines changed

14 files changed

+489
-323
lines changed

.env

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
SPACEX_URL=https://api.spacex.land/graphql/
1+
SPACEX_URL=https://spacex-production.up.railway.app/graphql/

.env.development

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
SPACEX_URL=https://api.spacex.land/graphql/
1+
SPACEX_URL=https://spacex-production.up.railway.app/graphql/

.env.local

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
SPACEX_URL=https://api.spacex.land/graphql/
1+
SPACEX_URL=https://spacex-production.up.railway.app/graphql/

.github/workflows/cd-alpha-release.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ jobs:
3333
cd "$GITHUB_WORKSPACE"
3434
git config user.email "[email protected]"
3535
git config user.name "$GITHUB_ACTOR"
36+
git pull
3637
npm version prerelease --preid=alpha
3738
git push
3839

.github/workflows/cd-beta-release.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ jobs:
3333
cd "$GITHUB_WORKSPACE"
3434
git config user.email "[email protected]"
3535
git config user.name "$GITHUB_ACTOR"
36+
git pull
3637
npm version prerelease --preid=beta
3738
git push
3839

.github/workflows/cd-latest-release.yml

Lines changed: 1 addition & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -32,49 +32,12 @@ jobs:
3232
- name: Build
3333
run: yarn build
3434

35-
- name: Get Commit Message
36-
run: |
37-
declare -A category=( [fix]="" [chore]="" [revert]="" [build]="" [docs]="" [feat]="" [perf]="" [refactor]="" [style]="" [temp]="" [test]="" [ci]="" [others]="")
38-
declare -A categoryTitle=( [fix]="<h5>Bug Fixes</h5>" [build]="<h5>Build</h5>" [docs]="<h5>Documentation</h5>" [feat]="<h5>New Features</h5>" [chore]="<h5>Changes to build process or aux tools</h5>" [ci]="<h5>Changes to CI config</h5>" [temp]="<h5>Temporary commit</h5>" [perf]="<h5>Performance Enhancement</h5>" [revert]="<h5>Revert Commits</h5>" [refactor]="<h5>Refactored</h5>" [style]="<h5>Changed Style</h5>" [test]="<h5>Added Tests</h5>" [others]="<h5>Others</h5>")
39-
msg="#${{ steps.getMergedPR.outputs.number}} ${{ steps.getMergedPR.outputs.title}}"
40-
for i in $(git log --format=%h $(git merge-base HEAD^1 HEAD^2)..HEAD^2)
41-
do
42-
IFS=":" read -r type cmmsg <<< $(git log --format=%B -n 1 $i)
43-
type="${type}" | xargs
44-
text_msg="&nbsp;&nbsp;&nbsp;&nbsp;&#8226; $i - ${cmmsg}<br/>"
45-
flag=1
46-
for i in "${!category[@]}"
47-
do
48-
if [ "${type}" == "$i" ]
49-
then
50-
category[$i]+="${text_msg}"
51-
flag=0
52-
break
53-
fi
54-
done
55-
if [ $flag -eq 1 ]
56-
then
57-
category[others]+="${text_msg}"
58-
fi
59-
done
60-
for i in "${!category[@]}"
61-
do
62-
if [ ! -z "${category[$i]}" ] && [ "others" != "$i" ]
63-
then
64-
msg+="${categoryTitle[$i]}${category[$i]}"
65-
fi
66-
done
67-
if [ ! -z "${category[others]}" ]
68-
then
69-
msg+="${categoryTitle[others]}${category[others]}"
70-
fi
71-
echo "COMMIT_MESSAGE=${msg}" >> $GITHUB_ENV
72-
7335
- name: Bump version and push tag
7436
run: |
7537
cd "$GITHUB_WORKSPACE"
7638
git config user.email "[email protected]"
7739
git config user.name "$GITHUB_ACTOR"
40+
git pull
7841
npm version patch
7942
git push
8043

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ jobs:
88
runs-on: ubuntu-latest
99
strategy:
1010
matrix:
11-
node-version: [12.x]
11+
node-version: [14.x]
1212

1313
steps:
1414
- uses: actions/checkout@v2

README.md

Lines changed: 27 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
</p>
1010

1111
<p>
12-
An enterprise react template application showcasing - Testing strategies, Global state management, middleware support, a network layer, component library integration, localization, PWA support, route configuration, lazy loading, and Continuous integration & deployment.
12+
An enterprise electron template application showcasing - Testing strategies, Global state management, middleware support, a network layer, component library integration, localization, PWA support, route configuration, lazy loading, and Continuous integration & deployment.
1313
</p>
1414

1515
---
@@ -33,7 +33,7 @@ An enterprise react template application showcasing - Testing strategies, Global
3333

3434
</div>
3535

36-
![React GraphQL TS Template CD](https://github.com/wednesday-solutions/react-graphql-ts-template/workflows/React%20GraphQL%20TypeScript%20Template%20CD/badge.svg)
36+
![ELECTRON REACT TS Template CD](https://github.com/wednesday-solutions/react-graphql-ts-template/workflows/React%20GraphQL%20TypeScript%20Template%20CD/badge.svg)
3737

3838
<div>
3939
<img src='./badges/badge-statements.svg' height="20"/>
@@ -48,10 +48,20 @@ An enterprise react template application showcasing - Testing strategies, Global
4848

4949
- Install dependencies using `yarn install`
5050

51-
- Start the dev server using `yarn start`
51+
- Start the electron dev server using `yarn run electron:start`
52+
53+
- Package the app for production using `yarn run electron:package`
5254

5355
- Go through the other scripts in `package.json`
5456

57+
## Electron Configuration
58+
59+
- Electron configuration using [main.js](https://www.electronjs.org/docs/latest/tutorial/examples)
60+
61+
Take a look at the following files
62+
63+
- [main/main.js](main/main.js)
64+
5565
## TypeScript Configuration
5666

5767
- Typescript Configuration using [tsconfig.json](https://www.typescriptlang.org/docs/handbook/tsconfig-json.html)
@@ -189,6 +199,20 @@ An enterprise react template application showcasing - Testing strategies, Global
189199
- [.github/workflows/ci.yml](.github/workflows/ci.yml)
190200
- [.github/workflows/cd.yml](.github/workflows/cd.yml)
191201

202+
## Auto release
203+
204+
- Each push into `dev` branch will produce a alpha release
205+
- Each push into `staging` branch will produce a beta release
206+
- Each push into `master` branch will produce a prod release
207+
208+
These releases will also have the respective packaged electron app in it assets.
209+
210+
Take a look at the following files
211+
212+
- [.github/workflows/cd-alpha-release.yml](.github/workflows/cd-alpha-release.yml)
213+
- [.github/workflows/cd-beta-release.yml](.github/workflows/cd-beta-release.yml)
214+
- [.github/workflows/cd-latest-release.yml](.github/workflows/cd-latest-release.yml)
215+
192216
## Testing using @testing-library/react
193217

194218
- Testing is done using the @testing-library/react.
@@ -265,13 +289,3 @@ Where `type` is one of the following:
265289
Where `flags` is an optional comma-separated list of one or more of the following (must be surrounded in square brackets):
266290
- `breaking`: alters `type` to be a breaking change
267291
And `category` can be anything of your choice. If you use a type not found in the list (but it still follows the same format of the message), it'll be grouped under `other`.
268-
269-
## Auto release
270-
271-
- Each push into `qa` branch will produce a beta release
272-
- Each push into `master` branch will produce a prod release
273-
274-
Take a look at the following files
275-
276-
- [.github/workflows/beta-release.yml](.github/workflows/beta-release.yml)
277-
- [.github/workflows/prod-release.yml](.github/workflows/prod-release.yml)

app/components/Siderbar/index.tsx

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,15 @@ const SidebarWrapper = styled.div`
1717
const SidebarDrawer = styled(Drawer)`
1818
&& {
1919
.ant-drawer-body {
20-
padding: ${(props) => props.theme.headerHeight} 0 0 0;
2120
background-color: ${colors.primary};
22-
width: ${(props) => props.theme.sidebarWidth};
2321
text-align: center;
2422
}
23+
.ant-drawer-header {
24+
border-bottom: 1px solid ${colors.primary};
25+
background-color: ${colors.primary};
26+
}
2527
.ant-drawer-close {
26-
top: 1rem;
28+
padding-top: 1rem;
2729
}
2830
}
2931
`;

app/containers/HomeContainer/tests/__snapshots__/index.test.tsx.snap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ exports[`<HomeContainer /> tests should render and match the snapshot 1`] = `
4848
class="HomeContainer__ButtonBox-sc-1ly6omb-3 gSuRgZ"
4949
>
5050
<button
51-
class="ant-btn"
51+
class="ant-btn ant-btn-default"
5252
data-testid="clear-sort"
5353
disabled=""
5454
type="button"

0 commit comments

Comments
 (0)