Skip to content

Commit 65a7919

Browse files
authored
Merge pull request #21 from skrtheboss/develop
Merge develop to master
2 parents e809daf + 1309455 commit 65a7919

File tree

6 files changed

+2464
-496
lines changed

6 files changed

+2464
-496
lines changed

.circleci/config.yml

+83-50
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ aliases:
55
- &job-defaults
66
working_directory: ~/semaphore
77
docker:
8-
# specify the version you desire here
9-
- image: circleci/node:8.16
8+
# specify the version you desire here
9+
- image: circleci/node:8.16
1010

1111
- &yarn-install
1212
run:
@@ -22,9 +22,9 @@ aliases:
2222
- &restore-cache
2323
name: Restore Yarn Package Cache
2424
keys:
25-
- yarn-packages-{{ .Branch }}-{{ checksum "yarn.lock" }}
26-
# Fallback in case checksum fails
27-
- yarn-packages-{{ .Branch }}-
25+
- yarn-packages-{{ .Branch }}-{{ checksum "yarn.lock" }}
26+
# Fallback in case checksum fails
27+
- yarn-packages-{{ .Branch }}-
2828

2929
- &save-cache
3030
name: Save Yarn Package Cache
@@ -33,10 +33,11 @@ aliases:
3333

3434
# Branch filter that can be specified for jobs that should only run on publish branches
3535
# (e.g. master )
36-
- &publish_branches_filter
36+
- &release_branches_filter
3737
branches:
3838
only:
39-
- master
39+
- master
40+
- /rc-.*/
4041

4142
# Workspace initially persisted by the `install` job, and then enhanced by `test_aio` and
4243
# `build-npm-packages`.
@@ -51,68 +52,100 @@ jobs:
5152
setup:
5253
<<: *job-defaults
5354
steps:
54-
- checkout
55-
- restore_cache: *restore-cache
56-
- *yarn-install
57-
- save_cache: *save-cache
58-
# Persist any changes at this point to be reused by further jobs.
59-
# **NOTE 1 **: Folders persisted here should be kept in sync with `var_13: &attach_workspace`.
60-
# **NOTE 2 **: To add new content to the workspace, always persist on the same root.
61-
- persist_to_workspace:
62-
root: ~/
63-
paths:
64-
- ./semaphore
55+
- checkout
56+
- restore_cache: *restore-cache
57+
- *yarn-install
58+
- save_cache: *save-cache
59+
# Persist any changes at this point to be reused by further jobs.
60+
# **NOTE 1 **: Folders persisted here should be kept in sync with `var_13: &attach_workspace`.
61+
# **NOTE 2 **: To add new content to the workspace, always persist on the same root.
62+
- persist_to_workspace:
63+
root: ~/
64+
paths:
65+
- ./semaphore
6566

6667
lint:
6768
<<: *job-defaults
6869
steps:
69-
- *attach-workspace
70-
- run: yarn lint --format junit -o reports/junit/js-lint-results.xml
71-
- store_test_results:
72-
path: reports/junit
70+
- *attach-workspace
71+
- run: yarn lint --format junit -o reports/junit/js-lint-results.xml
72+
- store_test_results:
73+
path: reports/junit
7374

7475
test:
7576
<<: *job-defaults
7677
steps:
77-
- *attach-workspace
78-
- run:
79-
command: yarn test:ci
80-
- store_test_results:
81-
path: reports/junit
82-
- codecov/upload:
83-
file: coverage/*.json
84-
flags: unittests
78+
- *attach-workspace
79+
- run:
80+
command: yarn test:ci
81+
- store_test_results:
82+
path: reports/junit
83+
- codecov/upload:
84+
file: coverage/*.json
85+
flags: unittests
86+
87+
check-dependencies:
88+
<<: *job-defaults
89+
steps:
90+
- *attach-workspace
91+
- run:
92+
command: ls -la
93+
- run:
94+
command: yarn check-dependencies
8595

8696
doc:
8797
<<: *job-defaults
8898
steps:
89-
- *attach-workspace
90-
- run:
91-
command: yarn doc
92-
- store_artifacts:
93-
path: docs
99+
- *attach-workspace
100+
- run:
101+
command: yarn doc
102+
- store_artifacts:
103+
path: docs
94104

95105
build:
96106
<<: *job-defaults
97107
steps:
98-
- *attach-workspace
99-
- run:
100-
command: yarn build
108+
- *attach-workspace
109+
- run:
110+
command: yarn build
111+
- persist_to_workspace:
112+
root: ~/
113+
paths:
114+
- ./semaphore/dist
115+
116+
release:
117+
<<: *job-defaults
118+
steps:
119+
- *attach-workspace
120+
- run:
121+
command: yarn semantic-release
101122

102123
workflows:
103124
version: 2
104125
default_workflow:
105126
jobs:
106-
- setup
107-
- lint:
108-
requires:
109-
- setup
110-
- test:
111-
requires:
112-
- setup
113-
- doc:
114-
requires:
115-
- setup
116-
- build:
117-
requires:
118127
- setup
128+
- lint:
129+
requires:
130+
- setup
131+
- test:
132+
requires:
133+
- setup
134+
- doc:
135+
requires:
136+
- setup
137+
- build:
138+
requires:
139+
- setup
140+
- check-dependencies:
141+
requires:
142+
- build
143+
- release:
144+
filters:
145+
*release_branches_filter
146+
requires:
147+
- lint
148+
- test
149+
- doc
150+
- build
151+
- check-dependencies

.npmignore

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
*
22
!/dist/**
33
!package.json
4-
!LICENSE.md
4+
!LICENSE
55
!README.md
66
!CHANGELOG.md

.releaserc

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
"branch": "master",
3+
"verifyConditions": "condition-circle",
4+
"plugins": [
5+
"@semantic-release/commit-analyzer",
6+
["@semantic-release/changelog", {
7+
"changelogFile": "CHANGELOG.md"
8+
}],
9+
"@semantic-release/release-notes-generator",
10+
"@semantic-release/npm",
11+
"@semantic-release/github"
12+
]
13+
}

README.md

+6
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
[![Build Status][build-status-image]][build-status-url]
22
[![Coverage Status][coverage-image]][coverage-url]
33
[![MIT License][license-image]][license-url]
4+
[![semantic-release][semantic-release-image]][semantic-release-url]
5+
[![Renovate enabled][renovate-image]][renovate-url]
46
[![NPM Package][npm-version-image]][npm-url]
57
[![NPM Package Downloads][npm-downloads-image]][npm-url]
68
# Async Semaphore
@@ -152,6 +154,10 @@ Returns: `Boolean` Promise `true` if success, `false` false if fail
152154
[build-status-url]: https://circleci.com/gh/skrtheboss/ts-async-semaphore/tree/master
153155
[coverage-image]: https://codecov.io/gh/skrtheboss/ts-async-semaphore/branch/master/graph/badge.svg
154156
[coverage-url]: https://codecov.io/gh/skrtheboss/ts-async-semaphore
157+
[renovate-image]: https://img.shields.io/badge/renovate-enabled-brightgreen.svg
158+
[renovate-url]: https://renovatebot.com/
159+
[semantic-release-image]: https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg
160+
[semantic-release-url]: https://github.com/semantic-release/semantic-release
155161
[npm-url]: https://npmjs.org/package/ts-async-semaphore
156162
[npm-version-image]: http://img.shields.io/npm/v/ts-async-semaphore.svg?style=flat
157163
[npm-downloads-image]: http://img.shields.io/npm/dm/ts-async-semaphore.svg?style=flat

package.json

+8-4
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,16 @@
11
{
22
"name": "ts-async-semaphore",
3-
"version": "0.0.0",
3+
"version": "0.0.0-development",
44
"description": "A counting semaphore for node based on Java's Sempahore.",
55
"main": "dist/semaphore.js",
66
"types": "dist/semaphore.d.ts",
77
"repository": {
88
"type": "git",
99
"url": "https://github.com/skrtheboss/ts-async-semaphore.git"
1010
},
11+
"contributors": [
12+
"Denis Frenademetz (https://github.com/skrtheboss)"
13+
],
1114
"author": "Denis Frenademetz",
1215
"license": "MIT",
1316
"private": false,
@@ -37,8 +40,7 @@
3740
"test:ci": "jest --ci --runInBand --coverage --config jest.config.ci.js && codecov",
3841
"clean": "shx rm -rf node_modules/ dist/ docs/ coverage/",
3942
"doc": "typedoc --out docs --name ts-async-semaphore --tsconfig tsconfig.json",
40-
"version": "yarn run version:changelog && git add CHANGELOG.md",
41-
"version:changelog": "conventional-changelog -p angular -i CHANGELOG.md -s"
43+
"semantic-release": "semantic-release"
4244
},
4345
"engines": {
4446
"node": ">=8.0.0"
@@ -47,14 +49,16 @@
4749
"@types/node": "^8.0.0"
4850
},
4951
"devDependencies": {
52+
"@semantic-release/changelog": "^3.0.2",
5053
"@types/jest": "24.0.11",
5154
"codecov": "3.3.0",
52-
"conventional-changelog-cli": "2.0.17",
55+
"condition-circle": "^2.0.2",
5356
"dependency-check": "3.3.0",
5457
"jest": "24.7.1",
5558
"jest-junit": "6.3.0",
5659
"jest-silent-reporter": "0.1.2",
5760
"rimraf": "2.6.3",
61+
"semantic-release": "15.13.3",
5862
"shx": "0.3.2",
5963
"ts-jest": "24.0.2",
6064
"tslint": "5.16.0",

0 commit comments

Comments
 (0)