diff --git a/docker-compose.override.yml b/docker-compose.override.yml index b44c8239..55e4e352 100644 --- a/docker-compose.override.yml +++ b/docker-compose.override.yml @@ -54,6 +54,7 @@ services: working_dir: /web volumes: - ./web:/web + - ./.git:/web/.git # allow fetching version tag ports: - 8080:8080 environment: diff --git a/pyproject.toml b/pyproject.toml index 273810c1..39b8a3c9 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -23,3 +23,6 @@ quote-style = "single" [tool.ruff.lint.isort] force-sort-within-sections = true # Sort by name, don't cluster "from" vs "import" combine-as-imports = true # Combines "as" imports on the same line + +[tool.semantic_release] +version_variables = ["setup.py:__version__", "web/package.json:version"] diff --git a/setup.py b/setup.py index 0062c0b2..9f6aad6e 100644 --- a/setup.py +++ b/setup.py @@ -2,6 +2,8 @@ from setuptools import find_packages, setup +__version__ = '0.4.1' + readme_file = Path(__file__).parent / 'README.md' if readme_file.exists(): with readme_file.open() as f: @@ -12,7 +14,7 @@ setup( name='uvdat', - version='0.1.0', + version=__version__, description='', long_description=long_description, long_description_content_type='text/markdown', diff --git a/web/package-lock.json b/web/package-lock.json index d4e64a89..8350043a 100644 --- a/web/package-lock.json +++ b/web/package-lock.json @@ -14,6 +14,7 @@ "axios": "^1.4.0", "buffer": "^6.0.3", "core-js": "^3.8.3", + "git-describe": "^4.1.1", "lodash": "^4.17.21", "maplibre-gl": "^4.6.0", "shpjs": "^4.0.4", @@ -4373,6 +4374,11 @@ "integrity": "sha512-wWKOClTTiizcZhXnPY4wikVAwmdYHp8q6DmC+EJUzAMsycb7HB32Kh9RN4+0gExjmPmZSAQjgURXIGATPegAvA==", "dev": true }, + "node_modules/@types/semver": { + "version": "7.5.8", + "resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.5.8.tgz", + "integrity": "sha512-I8EUhyrgfLrcTkzV3TSsGyl1tSuPrEDzr0yd5m90UgNxQkyDXULk3b6MlQqTCpZpNtWe1K0hzclnZkTcLBe2UQ==" + }, "node_modules/@types/send": { "version": "0.17.1", "resolved": "https://registry.npmjs.org/@types/send/-/send-0.17.1.tgz", @@ -9290,6 +9296,30 @@ "node": ">=0.10.0" } }, + "node_modules/git-describe": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/git-describe/-/git-describe-4.1.1.tgz", + "integrity": "sha512-JC8ganO5kO80G8+XE98TDDjnMXQN3Estk3qdJuG2EGRF/l6zuMTMcN+8OSfQZ5FWpqIRLB015anWX4aSRgnxAQ==", + "dependencies": { + "@types/semver": "^7.3.8", + "lodash": "^4.17.21" + }, + "engines": { + "node": ">=4.0.0" + }, + "optionalDependencies": { + "semver": "^5.6.0" + } + }, + "node_modules/git-describe/node_modules/semver": { + "version": "5.7.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", + "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==", + "optional": true, + "bin": { + "semver": "bin/semver" + } + }, "node_modules/gl-matrix": { "version": "3.4.3", "resolved": "https://registry.npmjs.org/gl-matrix/-/gl-matrix-3.4.3.tgz", @@ -18587,6 +18617,11 @@ "integrity": "sha512-wWKOClTTiizcZhXnPY4wikVAwmdYHp8q6DmC+EJUzAMsycb7HB32Kh9RN4+0gExjmPmZSAQjgURXIGATPegAvA==", "dev": true }, + "@types/semver": { + "version": "7.5.8", + "resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.5.8.tgz", + "integrity": "sha512-I8EUhyrgfLrcTkzV3TSsGyl1tSuPrEDzr0yd5m90UgNxQkyDXULk3b6MlQqTCpZpNtWe1K0hzclnZkTcLBe2UQ==" + }, "@types/send": { "version": "0.17.1", "resolved": "https://registry.npmjs.org/@types/send/-/send-0.17.1.tgz", @@ -22223,6 +22258,24 @@ "resolved": "https://registry.npmjs.org/get-value/-/get-value-2.0.6.tgz", "integrity": "sha512-Ln0UQDlxH1BapMu3GPtf7CuYNwRZf2gwCuPqbyG6pB8WfmFpzqcy4xtAaAMUhnNqjMKTiCPZG2oMT3YSx8U2NA==" }, + "git-describe": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/git-describe/-/git-describe-4.1.1.tgz", + "integrity": "sha512-JC8ganO5kO80G8+XE98TDDjnMXQN3Estk3qdJuG2EGRF/l6zuMTMcN+8OSfQZ5FWpqIRLB015anWX4aSRgnxAQ==", + "requires": { + "@types/semver": "^7.3.8", + "lodash": "^4.17.21", + "semver": "^5.6.0" + }, + "dependencies": { + "semver": { + "version": "5.7.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", + "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==", + "optional": true + } + } + }, "gl-matrix": { "version": "3.4.3", "resolved": "https://registry.npmjs.org/gl-matrix/-/gl-matrix-3.4.3.tgz", diff --git a/web/package.json b/web/package.json index c6595f07..3d4d8468 100644 --- a/web/package.json +++ b/web/package.json @@ -15,6 +15,7 @@ "axios": "^1.4.0", "buffer": "^6.0.3", "core-js": "^3.8.3", + "git-describe": "^4.1.1", "lodash": "^4.17.21", "maplibre-gl": "^4.6.0", "shpjs": "^4.0.4", diff --git a/web/src/App.vue b/web/src/App.vue index 1fbf6a93..e3a92eca 100644 --- a/web/src/App.vue +++ b/web/src/App.vue @@ -1,5 +1,5 @@