From dbff163b6b20d79dc089b8a2074702230ece19f5 Mon Sep 17 00:00:00 2001 From: Nicolai Ort Date: Wed, 7 Apr 2021 16:50:38 +0200 Subject: [PATCH 1/8] Added release-it w/ config ref #14 --- licenses.md | 59 +++++++++++++++++++++++++++++++++++++++------------- package.json | 26 ++++++++++++++++++++--- 2 files changed, 67 insertions(+), 18 deletions(-) diff --git a/licenses.md b/licenses.md index db36a85..ff4b06c 100644 --- a/licenses.md +++ b/licenses.md @@ -222,6 +222,35 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +# release-it +**Author**: Lars Kappert +**Repo**: https://github.com/release-it/release-it +**License**: MIT +**Description**: Generic CLI tool to automate versioning and package publishing related tasks. +## License Text +MIT License + +Copyright (c) 2018 Lars Kappert + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + + # svelte **Author**: Rich Harris **Repo**: https://github.com/sveltejs/svelte @@ -237,6 +266,21 @@ The above copyright notice and this permission notice shall be included in all c THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +# svelte-i18n +**Author**: Christian Kaisermann +**Repo**: https://github.com/kaisermann/svelte-i18n +**License**: MIT +**Description**: Internationalization library for Svelte +## License Text +Copyright 2017 Christian Kaisermann + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + # svelte-preprocess **Author**: Christian Kaisermann **Repo**: https://github.com/sveltejs/svelte-preprocess @@ -4987,18 +5031,3 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -# svelte-i18n -**Author**: Christian Kaisermann -**Repo**: https://github.com/kaisermann/svelte-i18n -**License**: MIT -**Description**: Internationalization library for Svelte -## License Text -Copyright 2017 Christian Kaisermann - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - - diff --git a/package.json b/package.json index 371ddfb..df14d6c 100644 --- a/package.json +++ b/package.json @@ -6,7 +6,8 @@ "build": "vite build", "format": "prettier --write --plugin-search-dir=. ./**/*.html ./**/*.svelte", "prepare": "husky install", - "license:export": "license-exporter --markdown && git stage licenses.md" + "license:export": "license-exporter --markdown && git stage licenses.md", + "release": "release-it --only-version" }, "devDependencies": { "@odit/license-exporter": "^0.0.11", @@ -18,10 +19,29 @@ "husky": "^5.1.3", "prettier": "^2.2.1", "prettier-plugin-svelte": "^2.2.0", + "release-it": "^14.5.1", "svelte": "^3.35.0", + "svelte-i18n": "^3.3.7", "svelte-preprocess": "^4.6.9", "vite": "^2.1.2", - "vite-plugin-windicss": "^0.9.2", - "svelte-i18n": "^3.3.7" + "vite-plugin-windicss": "^0.9.2" + }, + "release-it": { + "git": { + "commit": true, + "requireCleanWorkingDir": false, + "commitMessage": "🚀Bumped version to v${version}", + "requireBranch": "dev", + "push": false, + "tag": true, + "tagName": null, + "tagAnnotation": "v${version}" + }, + "npm": { + "publish": false + }, + "hooks": { + "after:bump": "npx auto-changelog --commit-limit false -p -u --hide-credit && git add CHANGELOG.md && node order.js && git add src/locales" + } } } From 69ab9893d3e38542697ca0cf54732d87a8e0197c Mon Sep 17 00:00:00 2001 From: Nicolai Ort Date: Wed, 7 Apr 2021 16:51:25 +0200 Subject: [PATCH 2/8] Updated version to the current electron version ref #14 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index df14d6c..9552c3d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@lfk/scanclient", - "version": "0.0.0", + "version": "0.1.1", "scripts": { "dev": "vite", "build": "vite build", From 3c2300c09e1d9a197433100846de180898c6e6c0 Mon Sep 17 00:00:00 2001 From: Nicolai Ort Date: Wed, 7 Apr 2021 16:51:25 +0200 Subject: [PATCH 3/8] Updated package version to the current version ref #14 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index df14d6c..9552c3d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@lfk/scanclient", - "version": "0.0.0", + "version": "0.1.1", "scripts": { "dev": "vite", "build": "vite build", From e7458c49f0b808b55118c7d83b488054445d4136 Mon Sep 17 00:00:00 2001 From: Nicolai Ort Date: Wed, 7 Apr 2021 16:59:35 +0200 Subject: [PATCH 4/8] Now also triggering electron build ref #14 --- .drone.yml | 27 +++++++++++++++++++++------ 1 file changed, 21 insertions(+), 6 deletions(-) diff --git a/.drone.yml b/.drone.yml index 407c6bb..cf7474c 100644 --- a/.drone.yml +++ b/.drone.yml @@ -4,13 +4,20 @@ name: gitea_token get: path: odit-git-bot name: apikey + +--- +kind: secret +name: git_ssh +get: + path: odit-git-bot + name: sshkey + --- kind: pipeline type: kubernetes -name: build +name: build:tag steps: - name: run build - depends_on: ["clone"] image: node:15.11.0-alpine3.13 commands: - apk add git zip -f @@ -18,8 +25,7 @@ steps: - yarn build - mkdir out - zip -r out/dist.zip dist - - name: gitea_release - depends_on: ["run build"] + - name: gitea add packages to build image: plugins/gitea-release settings: api_key: @@ -33,8 +39,17 @@ steps: - sha512 - adler32 - crc32 - when: - event: tag + - name: checkout electron + image: alpine/git + commands: + - git clone https://git.odit.services/lfk/scanclient-electron electron + - cd electron + - name: tag new version + image: node:alpine + commands: + - yarn + - yarn build + - npm --no-git-tag-version version ${DRONE_TAG} trigger: event: - tag \ No newline at end of file From 1d788671c6faf1ec7e1275a65d0eaf0dbd33d678 Mon Sep 17 00:00:00 2001 From: Nicolai Ort Date: Wed, 7 Apr 2021 16:59:42 +0200 Subject: [PATCH 5/8] 0.1.2 --- package.json | 94 ++++++++++++++++++++++++++-------------------------- 1 file changed, 47 insertions(+), 47 deletions(-) diff --git a/package.json b/package.json index 9552c3d..795df44 100644 --- a/package.json +++ b/package.json @@ -1,47 +1,47 @@ -{ - "name": "@lfk/scanclient", - "version": "0.1.1", - "scripts": { - "dev": "vite", - "build": "vite build", - "format": "prettier --write --plugin-search-dir=. ./**/*.html ./**/*.svelte", - "prepare": "husky install", - "license:export": "license-exporter --markdown && git stage licenses.md", - "release": "release-it --only-version" - }, - "devDependencies": { - "@odit/license-exporter": "^0.0.11", - "@svitejs/vite-plugin-svelte": "^0.11.1", - "@tsconfig/svelte": "^1.0.10", - "@types/html-minifier": "^4.0.0", - "axios": "^0.21.1", - "html-minifier": "^4.0.0", - "husky": "^5.1.3", - "prettier": "^2.2.1", - "prettier-plugin-svelte": "^2.2.0", - "release-it": "^14.5.1", - "svelte": "^3.35.0", - "svelte-i18n": "^3.3.7", - "svelte-preprocess": "^4.6.9", - "vite": "^2.1.2", - "vite-plugin-windicss": "^0.9.2" - }, - "release-it": { - "git": { - "commit": true, - "requireCleanWorkingDir": false, - "commitMessage": "🚀Bumped version to v${version}", - "requireBranch": "dev", - "push": false, - "tag": true, - "tagName": null, - "tagAnnotation": "v${version}" - }, - "npm": { - "publish": false - }, - "hooks": { - "after:bump": "npx auto-changelog --commit-limit false -p -u --hide-credit && git add CHANGELOG.md && node order.js && git add src/locales" - } - } -} +{ + "name": "@lfk/scanclient", + "version": "0.1.2", + "scripts": { + "dev": "vite", + "build": "vite build", + "format": "prettier --write --plugin-search-dir=. ./**/*.html ./**/*.svelte", + "prepare": "husky install", + "license:export": "license-exporter --markdown && git stage licenses.md", + "release": "release-it --only-version" + }, + "devDependencies": { + "@odit/license-exporter": "^0.0.11", + "@svitejs/vite-plugin-svelte": "^0.11.1", + "@tsconfig/svelte": "^1.0.10", + "@types/html-minifier": "^4.0.0", + "axios": "^0.21.1", + "html-minifier": "^4.0.0", + "husky": "^5.1.3", + "prettier": "^2.2.1", + "prettier-plugin-svelte": "^2.2.0", + "release-it": "^14.5.1", + "svelte": "^3.35.0", + "svelte-i18n": "^3.3.7", + "svelte-preprocess": "^4.6.9", + "vite": "^2.1.2", + "vite-plugin-windicss": "^0.9.2" + }, + "release-it": { + "git": { + "commit": true, + "requireCleanWorkingDir": false, + "commitMessage": "🚀Bumped version to v${version}", + "requireBranch": "dev", + "push": false, + "tag": true, + "tagName": null, + "tagAnnotation": "v${version}" + }, + "npm": { + "publish": false + }, + "hooks": { + "after:bump": "npx auto-changelog --commit-limit false -p -u --hide-credit && git add CHANGELOG.md && node order.js && git add src/locales" + } + } +} From 96cbac27028c81aaeeabcf9359632eda9ae21ae4 Mon Sep 17 00:00:00 2001 From: Nicolai Ort Date: Wed, 7 Apr 2021 17:00:54 +0200 Subject: [PATCH 6/8] Revert "0.1.2" This reverts commit 1d788671c6faf1ec7e1275a65d0eaf0dbd33d678. --- package.json | 94 ++++++++++++++++++++++++++-------------------------- 1 file changed, 47 insertions(+), 47 deletions(-) diff --git a/package.json b/package.json index 795df44..9552c3d 100644 --- a/package.json +++ b/package.json @@ -1,47 +1,47 @@ -{ - "name": "@lfk/scanclient", - "version": "0.1.2", - "scripts": { - "dev": "vite", - "build": "vite build", - "format": "prettier --write --plugin-search-dir=. ./**/*.html ./**/*.svelte", - "prepare": "husky install", - "license:export": "license-exporter --markdown && git stage licenses.md", - "release": "release-it --only-version" - }, - "devDependencies": { - "@odit/license-exporter": "^0.0.11", - "@svitejs/vite-plugin-svelte": "^0.11.1", - "@tsconfig/svelte": "^1.0.10", - "@types/html-minifier": "^4.0.0", - "axios": "^0.21.1", - "html-minifier": "^4.0.0", - "husky": "^5.1.3", - "prettier": "^2.2.1", - "prettier-plugin-svelte": "^2.2.0", - "release-it": "^14.5.1", - "svelte": "^3.35.0", - "svelte-i18n": "^3.3.7", - "svelte-preprocess": "^4.6.9", - "vite": "^2.1.2", - "vite-plugin-windicss": "^0.9.2" - }, - "release-it": { - "git": { - "commit": true, - "requireCleanWorkingDir": false, - "commitMessage": "🚀Bumped version to v${version}", - "requireBranch": "dev", - "push": false, - "tag": true, - "tagName": null, - "tagAnnotation": "v${version}" - }, - "npm": { - "publish": false - }, - "hooks": { - "after:bump": "npx auto-changelog --commit-limit false -p -u --hide-credit && git add CHANGELOG.md && node order.js && git add src/locales" - } - } -} +{ + "name": "@lfk/scanclient", + "version": "0.1.1", + "scripts": { + "dev": "vite", + "build": "vite build", + "format": "prettier --write --plugin-search-dir=. ./**/*.html ./**/*.svelte", + "prepare": "husky install", + "license:export": "license-exporter --markdown && git stage licenses.md", + "release": "release-it --only-version" + }, + "devDependencies": { + "@odit/license-exporter": "^0.0.11", + "@svitejs/vite-plugin-svelte": "^0.11.1", + "@tsconfig/svelte": "^1.0.10", + "@types/html-minifier": "^4.0.0", + "axios": "^0.21.1", + "html-minifier": "^4.0.0", + "husky": "^5.1.3", + "prettier": "^2.2.1", + "prettier-plugin-svelte": "^2.2.0", + "release-it": "^14.5.1", + "svelte": "^3.35.0", + "svelte-i18n": "^3.3.7", + "svelte-preprocess": "^4.6.9", + "vite": "^2.1.2", + "vite-plugin-windicss": "^0.9.2" + }, + "release-it": { + "git": { + "commit": true, + "requireCleanWorkingDir": false, + "commitMessage": "🚀Bumped version to v${version}", + "requireBranch": "dev", + "push": false, + "tag": true, + "tagName": null, + "tagAnnotation": "v${version}" + }, + "npm": { + "publish": false + }, + "hooks": { + "after:bump": "npx auto-changelog --commit-limit false -p -u --hide-credit && git add CHANGELOG.md && node order.js && git add src/locales" + } + } +} From d83a908db6372dd466656ce06706acd419a18f0f Mon Sep 17 00:00:00 2001 From: Nicolai Ort Date: Wed, 7 Apr 2021 18:12:45 +0200 Subject: [PATCH 7/8] Updated ci token and added electron build via ci custom call ref #14 --- .drone.yml | 23 +++++++++-------------- 1 file changed, 9 insertions(+), 14 deletions(-) diff --git a/.drone.yml b/.drone.yml index cf7474c..46125a9 100644 --- a/.drone.yml +++ b/.drone.yml @@ -7,10 +7,10 @@ get: --- kind: secret -name: git_ssh +name: ci_token get: - path: odit-git-bot - name: sshkey + path: odit-ci-bot + name: apikey --- kind: pipeline @@ -39,17 +39,12 @@ steps: - sha512 - adler32 - crc32 - - name: checkout electron - image: alpine/git - commands: - - git clone https://git.odit.services/lfk/scanclient-electron electron - - cd electron - - name: tag new version - image: node:alpine - commands: - - yarn - - yarn build - - npm --no-git-tag-version version ${DRONE_TAG} + - name: trigger electron build + image: idcooldi/drone-webhook + settings: + urls: https://ci.odit.services/api/repos/lfk/scanclient-electron/builds?SOURCE_TAG=${DRONE_TAG} + bearer: + from_secret: ci_token trigger: event: - tag \ No newline at end of file From 2f1567e802520c74ed4f0b2f8a1137ce4bb5eeff Mon Sep 17 00:00:00 2001 From: Nicolai Ort Date: Wed, 7 Apr 2021 19:22:39 +0200 Subject: [PATCH 8/8] Changed tag name scheme ref #14 --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 9552c3d..51dc323 100644 --- a/package.json +++ b/package.json @@ -30,12 +30,12 @@ "git": { "commit": true, "requireCleanWorkingDir": false, - "commitMessage": "🚀Bumped version to v${version}", + "commitMessage": "🚀Bumped version to ${version}", "requireBranch": "dev", "push": false, "tag": true, "tagName": null, - "tagAnnotation": "v${version}" + "tagAnnotation": "${version}" }, "npm": { "publish": false