mirror of
https://github.com/thegeeklab/hugo-geekblog.git
synced 2024-11-22 05:00:39 +00:00
ci: improve version file and tarball creation (#301)
This commit is contained in:
parent
0345c47b7c
commit
6f0f82757a
12
.drone.yml
12
.drone.yml
@ -102,17 +102,21 @@ steps:
|
|||||||
- name: assets
|
- name: assets
|
||||||
image: node:lts
|
image: node:lts
|
||||||
commands:
|
commands:
|
||||||
|
- git fetch -tq
|
||||||
- npm install > /dev/null
|
- npm install > /dev/null
|
||||||
- npm run build
|
- npm run build
|
||||||
|
- cat VERSION
|
||||||
environment:
|
environment:
|
||||||
FORCE_COLOR: true
|
FORCE_COLOR: true
|
||||||
NPM_CONFIG_LOGLEVEL: error
|
NPM_CONFIG_LOGLEVEL: error
|
||||||
|
|
||||||
- name: package
|
- name: package
|
||||||
image: thegeeklab/alpine-tools
|
image: node:lts
|
||||||
commands:
|
commands:
|
||||||
- echo "${DRONE_TAG:-latest}" > VERSION
|
- npm run pack
|
||||||
- tar -zcvf dist/hugo-geekblog.tar.gz -X .tarignore .
|
environment:
|
||||||
|
FORCE_COLOR: true
|
||||||
|
NPM_CONFIG_LOGLEVEL: error
|
||||||
|
|
||||||
- name: checksum
|
- name: checksum
|
||||||
image: thegeeklab/alpine-tools
|
image: thegeeklab/alpine-tools
|
||||||
@ -283,6 +287,6 @@ depends_on:
|
|||||||
|
|
||||||
---
|
---
|
||||||
kind: signature
|
kind: signature
|
||||||
hmac: edaa3b55fd0fa9e3ee94e26ec12386e405da77c12f648862d8cdf5a86ece2adf
|
hmac: a3c1af6ac4b291e8aa1e7f9cbccb1a7c7edbf75163a36ed811c0694227a4f792
|
||||||
|
|
||||||
...
|
...
|
||||||
|
1
.gitignore
vendored
1
.gitignore
vendored
@ -17,6 +17,7 @@ CHANGELOG.md
|
|||||||
/resources/
|
/resources/
|
||||||
/exampleSite/resources/
|
/exampleSite/resources/
|
||||||
/exampleSite/data/sprites/
|
/exampleSite/data/sprites/
|
||||||
|
VERSION
|
||||||
|
|
||||||
# testing
|
# testing
|
||||||
.lighthouseci/
|
.lighthouseci/
|
||||||
|
@ -24,6 +24,9 @@ npm install
|
|||||||
|
|
||||||
# run the build script to build required assets
|
# run the build script to build required assets
|
||||||
npm run build
|
npm run build
|
||||||
|
|
||||||
|
# build release tarball
|
||||||
|
npm run pack
|
||||||
```
|
```
|
||||||
|
|
||||||
See the [Getting Started Guide](https://hugo-geekblog.geekdocs.de/posts/usage/getting-started/) for details about the different setup options.
|
See the [Getting Started Guide](https://hugo-geekblog.geekdocs.de/posts/usage/getting-started/) for details about the different setup options.
|
||||||
|
@ -46,6 +46,9 @@ npm install
|
|||||||
|
|
||||||
# run the build script to build required assets
|
# run the build script to build required assets
|
||||||
npm run build
|
npm run build
|
||||||
|
|
||||||
|
# build release tarball
|
||||||
|
npm run pack
|
||||||
```
|
```
|
||||||
|
|
||||||
## Using the theme
|
## Using the theme
|
||||||
|
74
package-lock.json
generated
74
package-lock.json
generated
@ -16,6 +16,7 @@
|
|||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@babel/eslint-parser": "7.18.9",
|
"@babel/eslint-parser": "7.18.9",
|
||||||
|
"@eloquent/git-version-webpack-plugin": "^5.0.1",
|
||||||
"autoprefixer": "10.4.8",
|
"autoprefixer": "10.4.8",
|
||||||
"copy-webpack-plugin": "11.0.0",
|
"copy-webpack-plugin": "11.0.0",
|
||||||
"css-loader": "6.7.1",
|
"css-loader": "6.7.1",
|
||||||
@ -441,6 +442,43 @@
|
|||||||
"node": ">=10.0.0"
|
"node": ">=10.0.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/@eloquent/git-version-webpack-plugin": {
|
||||||
|
"version": "5.0.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/@eloquent/git-version-webpack-plugin/-/git-version-webpack-plugin-5.0.1.tgz",
|
||||||
|
"integrity": "sha512-p445+YEiw6U8nfaiPe3e+HhMGVdlW3q3YraD22N2oI1ldVLF9UOVHJcWWs3Nqg2JQKCNHXa4vnb6mTgEDoclSQ==",
|
||||||
|
"dev": true,
|
||||||
|
"dependencies": {
|
||||||
|
"safe-require": "^1.0.3",
|
||||||
|
"schema-utils": "^3.0.0"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">=12"
|
||||||
|
},
|
||||||
|
"optionalDependencies": {
|
||||||
|
"html-webpack-plugin": "^5.3.1"
|
||||||
|
},
|
||||||
|
"peerDependencies": {
|
||||||
|
"webpack": "^5.34.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/@eloquent/git-version-webpack-plugin/node_modules/schema-utils": {
|
||||||
|
"version": "3.1.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-3.1.1.tgz",
|
||||||
|
"integrity": "sha512-Y5PQxS4ITlC+EahLuXaY86TXfR7Dc5lw294alXOq86JAHCihAIZfqv8nNCWvaEJvaC51uN9hbLGeV0cFBdH+Fw==",
|
||||||
|
"dev": true,
|
||||||
|
"dependencies": {
|
||||||
|
"@types/json-schema": "^7.0.8",
|
||||||
|
"ajv": "^6.12.5",
|
||||||
|
"ajv-keywords": "^3.5.2"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">= 10.13.0"
|
||||||
|
},
|
||||||
|
"funding": {
|
||||||
|
"type": "opencollective",
|
||||||
|
"url": "https://opencollective.com/webpack"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/@eslint/eslintrc": {
|
"node_modules/@eslint/eslintrc": {
|
||||||
"version": "1.3.1",
|
"version": "1.3.1",
|
||||||
"resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-1.3.1.tgz",
|
"resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-1.3.1.tgz",
|
||||||
@ -9700,6 +9738,12 @@
|
|||||||
"ret": "~0.1.10"
|
"ret": "~0.1.10"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/safe-require": {
|
||||||
|
"version": "1.0.4",
|
||||||
|
"resolved": "https://registry.npmjs.org/safe-require/-/safe-require-1.0.4.tgz",
|
||||||
|
"integrity": "sha512-1elAbSH1u7HVMfbuqktLWAN0wMOeT+FnJVqMhBgEJLvL95m+KT433tiJdGMV1e3TstQXRt1YrKQDRBu0Kpk4WA==",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
"node_modules/safe-stable-stringify": {
|
"node_modules/safe-stable-stringify": {
|
||||||
"version": "2.3.1",
|
"version": "2.3.1",
|
||||||
"resolved": "https://registry.npmjs.org/safe-stable-stringify/-/safe-stable-stringify-2.3.1.tgz",
|
"resolved": "https://registry.npmjs.org/safe-stable-stringify/-/safe-stable-stringify-2.3.1.tgz",
|
||||||
@ -12953,6 +12997,30 @@
|
|||||||
"integrity": "sha512-dBVuXR082gk3jsFp7Rd/JI4kytwGHecnCoTtXFb7DB6CNHp4rg5k1bhg0nWdLGLnOV71lmDzGQaLMy8iPLY0pw==",
|
"integrity": "sha512-dBVuXR082gk3jsFp7Rd/JI4kytwGHecnCoTtXFb7DB6CNHp4rg5k1bhg0nWdLGLnOV71lmDzGQaLMy8iPLY0pw==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
|
"@eloquent/git-version-webpack-plugin": {
|
||||||
|
"version": "5.0.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/@eloquent/git-version-webpack-plugin/-/git-version-webpack-plugin-5.0.1.tgz",
|
||||||
|
"integrity": "sha512-p445+YEiw6U8nfaiPe3e+HhMGVdlW3q3YraD22N2oI1ldVLF9UOVHJcWWs3Nqg2JQKCNHXa4vnb6mTgEDoclSQ==",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"html-webpack-plugin": "^5.3.1",
|
||||||
|
"safe-require": "^1.0.3",
|
||||||
|
"schema-utils": "^3.0.0"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"schema-utils": {
|
||||||
|
"version": "3.1.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-3.1.1.tgz",
|
||||||
|
"integrity": "sha512-Y5PQxS4ITlC+EahLuXaY86TXfR7Dc5lw294alXOq86JAHCihAIZfqv8nNCWvaEJvaC51uN9hbLGeV0cFBdH+Fw==",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"@types/json-schema": "^7.0.8",
|
||||||
|
"ajv": "^6.12.5",
|
||||||
|
"ajv-keywords": "^3.5.2"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
"@eslint/eslintrc": {
|
"@eslint/eslintrc": {
|
||||||
"version": "1.3.1",
|
"version": "1.3.1",
|
||||||
"resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-1.3.1.tgz",
|
"resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-1.3.1.tgz",
|
||||||
@ -20172,6 +20240,12 @@
|
|||||||
"ret": "~0.1.10"
|
"ret": "~0.1.10"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"safe-require": {
|
||||||
|
"version": "1.0.4",
|
||||||
|
"resolved": "https://registry.npmjs.org/safe-require/-/safe-require-1.0.4.tgz",
|
||||||
|
"integrity": "sha512-1elAbSH1u7HVMfbuqktLWAN0wMOeT+FnJVqMhBgEJLvL95m+KT433tiJdGMV1e3TstQXRt1YrKQDRBu0Kpk4WA==",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
"safe-stable-stringify": {
|
"safe-stable-stringify": {
|
||||||
"version": "2.3.1",
|
"version": "2.3.1",
|
||||||
"resolved": "https://registry.npmjs.org/safe-stable-stringify/-/safe-stable-stringify-2.3.1.tgz",
|
"resolved": "https://registry.npmjs.org/safe-stable-stringify/-/safe-stable-stringify-2.3.1.tgz",
|
||||||
|
@ -7,6 +7,7 @@
|
|||||||
"build": "run-s prep:clean prep:make svg build:webpack",
|
"build": "run-s prep:clean prep:make svg build:webpack",
|
||||||
"build:webpack": "webpack --mode=production",
|
"build:webpack": "webpack --mode=production",
|
||||||
"build:webpack-devel": "webpack --mode=development",
|
"build:webpack-devel": "webpack --mode=development",
|
||||||
|
"pack": "tar -zcvf dist/hugo-geekdoc.tar.gz -X .tarignore .",
|
||||||
"start": "run-s prep:clean prep:make svg build:webpack-devel ; run-p start:webpack start:hugo",
|
"start": "run-s prep:clean prep:make svg build:webpack-devel ; run-p start:webpack start:hugo",
|
||||||
"start:webpack": "webpack --mode=development --watch",
|
"start:webpack": "webpack --mode=development --watch",
|
||||||
"start:build": "webpack --mode=development",
|
"start:build": "webpack --mode=development",
|
||||||
@ -37,6 +38,7 @@
|
|||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@babel/eslint-parser": "7.18.9",
|
"@babel/eslint-parser": "7.18.9",
|
||||||
|
"@eloquent/git-version-webpack-plugin": "^5.0.1",
|
||||||
"autoprefixer": "10.4.8",
|
"autoprefixer": "10.4.8",
|
||||||
"copy-webpack-plugin": "11.0.0",
|
"copy-webpack-plugin": "11.0.0",
|
||||||
"css-loader": "6.7.1",
|
"css-loader": "6.7.1",
|
||||||
|
@ -2,6 +2,7 @@ const path = require("path")
|
|||||||
const glob = require("glob")
|
const glob = require("glob")
|
||||||
|
|
||||||
const { WebpackManifestPlugin } = require("webpack-manifest-plugin")
|
const { WebpackManifestPlugin } = require("webpack-manifest-plugin")
|
||||||
|
const GitVersionPlugin = require("@eloquent/git-version-webpack-plugin")
|
||||||
const FaviconsWebpackPlugin = require("favicons-webpack-plugin")
|
const FaviconsWebpackPlugin = require("favicons-webpack-plugin")
|
||||||
const RemoveEmptyScriptsPlugin = require("webpack-remove-empty-scripts")
|
const RemoveEmptyScriptsPlugin = require("webpack-remove-empty-scripts")
|
||||||
const CopyPlugin = require("copy-webpack-plugin")
|
const CopyPlugin = require("copy-webpack-plugin")
|
||||||
@ -97,6 +98,10 @@ var config = {
|
|||||||
|
|
||||||
new SRIPlugin({
|
new SRIPlugin({
|
||||||
sourceFile: "data/assets.json"
|
sourceFile: "data/assets.json"
|
||||||
|
}),
|
||||||
|
|
||||||
|
new GitVersionPlugin({
|
||||||
|
path: "../VERSION"
|
||||||
})
|
})
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user