added dynamic version support and solved loop call issue
This commit is contained in:
@@ -3,7 +3,8 @@ on:
|
|||||||
push:
|
push:
|
||||||
branches: [ master ]
|
branches: [ master ]
|
||||||
jobs:
|
jobs:
|
||||||
"Build pip package":
|
build_pip_package:
|
||||||
|
name: "Build Pip package"
|
||||||
runs-on: woryzen
|
runs-on: woryzen
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout sources
|
- name: Checkout sources
|
||||||
@@ -25,7 +26,8 @@ jobs:
|
|||||||
TWINE_PASSWORD: ${{ secrets.PUBLISHER_TOKEN }}
|
TWINE_PASSWORD: ${{ secrets.PUBLISHER_TOKEN }}
|
||||||
run: |
|
run: |
|
||||||
.venv/bin/python -m twine upload --repository gitea dist/*{.whl,tar.gz}
|
.venv/bin/python -m twine upload --repository gitea dist/*{.whl,tar.gz}
|
||||||
"Build Docker image":
|
biuld_docker_image:
|
||||||
|
name: "Build Docker image"
|
||||||
runs-on: woryzen
|
runs-on: woryzen
|
||||||
steps:
|
steps:
|
||||||
-
|
-
|
||||||
@@ -43,6 +45,9 @@ jobs:
|
|||||||
registry: gitea.woggioni.net
|
registry: gitea.woggioni.net
|
||||||
username: woggioni
|
username: woggioni
|
||||||
password: ${{ secrets.PUBLISHER_TOKEN }}
|
password: ${{ secrets.PUBLISHER_TOKEN }}
|
||||||
|
- name: Get package version
|
||||||
|
run: |
|
||||||
|
echo VERSION=$(python -m setuptools_scm) >> "$GITHUB_ENV"
|
||||||
-
|
-
|
||||||
name: Build and push bugis images
|
name: Build and push bugis images
|
||||||
uses: docker/build-push-action@v6
|
uses: docker/build-push-action@v6
|
||||||
@@ -54,6 +59,6 @@ jobs:
|
|||||||
pull: true
|
pull: true
|
||||||
tags: |
|
tags: |
|
||||||
"gitea.woggioni.net/woggioni/bugis:latest"
|
"gitea.woggioni.net/woggioni/bugis:latest"
|
||||||
"gitea.woggioni.net/woggioni/bugis:1.0"
|
"gitea.woggioni.net/woggioni/bugis:${env:VERSION}"
|
||||||
cache-from: type=registry,ref=gitea.woggioni.net/woggioni/bugis:buildx
|
cache-from: type=registry,ref=gitea.woggioni.net/woggioni/bugis:buildx
|
||||||
cache-to: type=registry,mode=max,compression=zstd,image-manifest=true,oci-mediatypes=true,ref=gitea.woggioni.net/woggioni/bugis:buildx
|
cache-to: type=registry,mode=max,compression=zstd,image-manifest=true,oci-mediatypes=true,ref=gitea.woggioni.net/woggioni/bugis:buildx
|
||||||
|
@@ -1,10 +1,10 @@
|
|||||||
[build-system]
|
[build-system]
|
||||||
requires = ["setuptools>=61.0"]
|
requires = ["setuptools>=61.0", "setuptools-scm>=8"]
|
||||||
build-backend = "setuptools.build_meta"
|
build-backend = "setuptools.build_meta"
|
||||||
|
|
||||||
[project]
|
[project]
|
||||||
name = "bugis"
|
name = "bugis"
|
||||||
version = "1.0"
|
dynamic = ["version"]
|
||||||
authors = [
|
authors = [
|
||||||
{ name="Walter Oggioni", email="oggioni.walter@gmail.com" },
|
{ name="Walter Oggioni", email="oggioni.walter@gmail.com" },
|
||||||
]
|
]
|
||||||
@@ -54,4 +54,6 @@ no_implicit_optional = true
|
|||||||
warn_return_any = true
|
warn_return_any = true
|
||||||
warn_unused_ignores = true
|
warn_unused_ignores = true
|
||||||
exclude = ["scripts", "docs", "test"]
|
exclude = ["scripts", "docs", "test"]
|
||||||
strict = true
|
strict = true
|
||||||
|
|
||||||
|
[tool.setuptools_scm]
|
||||||
|
@@ -1,5 +1,6 @@
|
|||||||
function req(first) {
|
function req(first) {
|
||||||
var xmlhttp = new XMLHttpRequest();
|
const start = new Date().getTime();
|
||||||
|
const xmlhttp = new XMLHttpRequest();
|
||||||
xmlhttp.onload = function() {
|
xmlhttp.onload = function() {
|
||||||
if (xmlhttp.status == 200) {
|
if (xmlhttp.status == 200) {
|
||||||
document.querySelector("article.markdown-body").innerHTML = xmlhttp.responseText;
|
document.querySelector("article.markdown-body").innerHTML = xmlhttp.responseText;
|
||||||
@@ -7,7 +8,8 @@ function req(first) {
|
|||||||
} else {
|
} else {
|
||||||
console.log(xmlhttp.status, xmlhttp.statusText);
|
console.log(xmlhttp.status, xmlhttp.statusText);
|
||||||
}
|
}
|
||||||
req(false);
|
const nextCall = Math.min(1000, Math.max(0, 1000 - (new Date().getTime() - start)));
|
||||||
|
setTimeout(req, nextCall, false);
|
||||||
};
|
};
|
||||||
xmlhttp.onerror = function() {
|
xmlhttp.onerror = function() {
|
||||||
console.log(xmlhttp.status, xmlhttp.statusText);
|
console.log(xmlhttp.status, xmlhttp.statusText);
|
||||||
|
Reference in New Issue
Block a user