@oliasoft-open-source/charts-library 2.0.0 → 2.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/.gitlab-ci.yml CHANGED
@@ -46,6 +46,9 @@ publish:
46
46
  script:
47
47
  # Get the version from package.json
48
48
  - VERSION=$(node -p "require('./package.json').version")
49
+ # Prepare MatterMost message
50
+ - MESSAGE="🤖 Charts Library version $VERSION released"
51
+ - chmod +x ./scripts/send-mattermost-message.sh
49
52
  # Prepare .npmrc
50
53
  - echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > .npmrc
51
54
  # Configure git
@@ -66,12 +69,12 @@ publish:
66
69
  echo "Version $VERSION already exists"
67
70
  exit 1
68
71
  else
69
- # Tag a release in gitlab
70
72
  echo "Tagging release in git"
71
73
  git tag $VERSION -m "🤖 Tagged by Gitlab CI/CD Pipeline" -m "For further reference see $CI_PIPELINE_URL" -m "[skip ci]"
72
74
  echo "Pushing tag to remote repository"
73
75
  git push origin $VERSION --no-verify
74
- # Publish the NPM package to the public NPM registry
75
76
  echo "Publishing package to NPM registry"
76
77
  npm publish
77
- fi
78
+ echo "Notifying MatterMost"
79
+ ./scripts/send-mattermost-message.sh "$MATTERMOST_BOT_KEY" "$MESSAGE"
80
+ fi
package/README.md CHANGED
@@ -1,5 +1,3 @@
1
- # React UI Library
1
+ # Chart Library
2
2
 
3
- React UI Library is a collection of reusable UI components for use in React applications.
4
-
5
- For usage instructions and technical documentation, see the [Wiki](https://gitlab.com/oliasoft-open-source/react-ui-library/wikis/home).
3
+ Reusable charts for use in React applications.
package/package.json CHANGED
@@ -1,11 +1,11 @@
1
1
  {
2
2
  "name": "@oliasoft-open-source/charts-library",
3
- "version": "2.0.0",
3
+ "version": "2.1.0",
4
4
  "description": "React Chart Library (based on Chart.js and react-chart-js-2)",
5
5
  "main": "index.js",
6
6
  "scripts": {
7
7
  "build": "npm run build:storybook",
8
- "build:storybook": "build-storybook --quiet --output-dir ./public/storybook",
8
+ "build:storybook": "build-storybook --quiet --output-dir ./public",
9
9
  "dev:storybook": "start-storybook -p 6006",
10
10
  "test": "npm run prettier:check && npm run lint:check && npm run test:unit",
11
11
  "test:unit": "jest",
@@ -0,0 +1,21 @@
1
+ #!/bin/bash
2
+ set -eEuo pipefail
3
+
4
+ # This script requires the following things to be installed:
5
+ # - bash
6
+ # - curl
7
+
8
+ # Required inputs:
9
+ MATTERMOST_BOT_KEY=$1
10
+ MSG=$2
11
+
12
+ # Optional inputs:
13
+ CHANNEL=${3:-'#releases'}
14
+ USERNAME=${4:-'Gitlab CI/CD'}
15
+ ICON_URL=${5:-'https://oliasoftstaticwebsite.blob.core.windows.net/helpguideimages/robot-icon.png'}
16
+ MATTERMOST_URL=${6:-'https://mm.oliasoft.com/hooks/'}
17
+
18
+ curl -X POST \
19
+ --data-urlencode \
20
+ "payload={\"channel\": \"$CHANNEL\", \"username\": \"$USERNAME\", \"icon_url\": \"$ICON_URL\", \"text\": \"$MSG\"}" \
21
+ $MATTERMOST_URL$MATTERMOST_BOT_KEY