added dynamic version support and solved loop call issue
This commit is contained in:
@@ -3,7 +3,8 @@ on:
|
||||
push:
|
||||
branches: [ master ]
|
||||
jobs:
|
||||
"Build pip package":
|
||||
build_pip_package:
|
||||
name: "Build Pip package"
|
||||
runs-on: woryzen
|
||||
steps:
|
||||
- name: Checkout sources
|
||||
@@ -25,7 +26,8 @@ jobs:
|
||||
TWINE_PASSWORD: ${{ secrets.PUBLISHER_TOKEN }}
|
||||
run: |
|
||||
.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
|
||||
steps:
|
||||
-
|
||||
@@ -43,6 +45,9 @@ jobs:
|
||||
registry: gitea.woggioni.net
|
||||
username: woggioni
|
||||
password: ${{ secrets.PUBLISHER_TOKEN }}
|
||||
- name: Get package version
|
||||
run: |
|
||||
echo VERSION=$(python -m setuptools_scm) >> "$GITHUB_ENV"
|
||||
-
|
||||
name: Build and push bugis images
|
||||
uses: docker/build-push-action@v6
|
||||
@@ -54,6 +59,6 @@ jobs:
|
||||
pull: true
|
||||
tags: |
|
||||
"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-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]
|
||||
requires = ["setuptools>=61.0"]
|
||||
requires = ["setuptools>=61.0", "setuptools-scm>=8"]
|
||||
build-backend = "setuptools.build_meta"
|
||||
|
||||
[project]
|
||||
name = "bugis"
|
||||
version = "1.0"
|
||||
dynamic = ["version"]
|
||||
authors = [
|
||||
{ name="Walter Oggioni", email="oggioni.walter@gmail.com" },
|
||||
]
|
||||
@@ -54,4 +54,6 @@ no_implicit_optional = true
|
||||
warn_return_any = true
|
||||
warn_unused_ignores = true
|
||||
exclude = ["scripts", "docs", "test"]
|
||||
strict = true
|
||||
strict = true
|
||||
|
||||
[tool.setuptools_scm]
|
||||
|
@@ -1,5 +1,6 @@
|
||||
function req(first) {
|
||||
var xmlhttp = new XMLHttpRequest();
|
||||
const start = new Date().getTime();
|
||||
const xmlhttp = new XMLHttpRequest();
|
||||
xmlhttp.onload = function() {
|
||||
if (xmlhttp.status == 200) {
|
||||
document.querySelector("article.markdown-body").innerHTML = xmlhttp.responseText;
|
||||
@@ -7,7 +8,8 @@ function req(first) {
|
||||
} else {
|
||||
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() {
|
||||
console.log(xmlhttp.status, xmlhttp.statusText);
|
||||
|
Reference in New Issue
Block a user