Skip to content

Commit

Permalink
Chore: Prepare for stable release
Browse files Browse the repository at this point in the history
  • Loading branch information
OndraM committed Dec 6, 2021
1 parent b7bb2de commit a215c45
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 18 deletions.
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,13 @@ Load default CSS along with your styles in `<head>`:

```html
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700&display=swap">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@lmc-eu/cookie-consent-manager@0.8/LmcCookieConsentManager.min.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@lmc-eu/cookie-consent-manager@1/LmcCookieConsentManager.min.css">
```

Load the script and initialize the plugin right before ending `</body>` tag:

```html
<script defer src="https://cdn.jsdelivr.net/npm/@lmc-eu/cookie-consent-manager@0.8/init.js"></script>
<script defer src="https://cdn.jsdelivr.net/npm/@lmc-eu/cookie-consent-manager@1/init.js"></script>
<script>
window.addEventListener('load', function () {
initLmcCookieConsentManager('demo.example'); // use the name of your service, like jobs.cz, seduo.pl etc.
Expand All @@ -56,10 +56,10 @@ This will load the plugin from CDN and initialize the plugin with default settin
You can load the plugin from a CDN, as in the basic example above.

```html
<!-- Note we use version "cookie-consent-manager@0.8", which points the latest version of this series (including bugfix releases) -->
<!-- Note we use version "cookie-consent-manager@1", which points to the latest version of this series (including feature and bugfix releases) -->
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700&display=swap">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@lmc-eu/cookie-consent-manager@0.8/LmcCookieConsentManager.min.css">
<script defer src="https://cdn.jsdelivr.net/npm/@lmc-eu/cookie-consent-manager@0.8/init.js"></script>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@lmc-eu/cookie-consent-manager@1/LmcCookieConsentManager.min.css">
<script defer src="https://cdn.jsdelivr.net/npm/@lmc-eu/cookie-consent-manager@1/init.js"></script>
```

Alternatively, you can also download the latest version from the [Releases page](https://github.com/lmc-eu/cookie-consent-manager/releases).
Expand Down
13 changes: 3 additions & 10 deletions bin/ci/semver.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,9 @@ function grep_word_from_git_commits_since_last_tag() {
}

function get_version() {
##
# TODO: Comment out this code when packages are stable
# if [ `grep_word_from_git_commits_since_last_tag "BREAKING CHANGE"` -gt 0 ]
# then
# echo "major"
# elif [ `grep_word_from_git_commits_since_last_tag "Feat"` -gt 0 ]
# The packages are still unstable so we update only 0.x.x versions (minor and patch)
# however breaking changes are still documented in the changelog
if [ `grep_word_from_git_commits_since_last_tag "BREAKING CHANGE"` -gt 0 ] || [ `grep_word_from_git_commits_since_last_tag "Feat"` -gt 0 ]
then
if [ $(grep_word_from_git_commits_since_last_tag "BREAKING CHANGE") -gt 0 ]; then
echo "major"
elif [ $(grep_word_from_git_commits_since_last_tag "Feat") -gt 0 ]; then
echo "minor"
else
echo "patch"
Expand Down
6 changes: 3 additions & 3 deletions scripts/readme-replace-version.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
/* eslint-disable no-console */
const replace = require('replace-in-file');
const packageJson = require('../package.json');
// TODO: match just major version after 1.0 release
const newVersion = packageJson.version.match(/([0-9]\.[0-9])\.[0-9]/)[1];

const newVersion = packageJson.version.match(/([0-9])\.[0-9]\.[0-9]/)[1];

const options = {
files: 'README.md',
from: /cookie-consent-manager@([0-9]\.[0-9])/gm, // TODO: replace with ([0-9]) after 1.0 release
from: /cookie-consent-manager@([0-9])/gm,
to: `cookie-consent-manager@${newVersion}`,
};

Expand Down

0 comments on commit a215c45

Please sign in to comment.