Skip to content

Commit

Permalink
fix versioning
Browse files Browse the repository at this point in the history
  • Loading branch information
mucsi96 committed Jun 3, 2024
1 parent d5d284b commit 695c088
Show file tree
Hide file tree
Showing 4 changed files with 42 additions and 3 deletions.
1 change: 1 addition & 0 deletions .python-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ui-elements
17 changes: 17 additions & 0 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,23 @@
{
"version": "2.0.0",
"osx": {
"options": {
"shell": {
"executable": "${env:SHELL}",
"args": ["--login", "--interactive"]
}
}
},
"tasks": [
{
"type": "shell",
"command": "./scripts/install_dependencies.sh",
"label": "Install dependencies",
"options": {
"cwd": "${workspaceFolder}",
},
"problemMatcher": []
},
{
"type": "npm",
"script": "start",
Expand Down
18 changes: 18 additions & 0 deletions scripts/install_dependencies.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#!/bin/bash

project=ui-elements
pyenv_version=3.12.3

brew update && brew install pyenv pyenv-virtualenv node

if ! pyenv virtualenvs | grep -q "$project"; then
pyenv install $pyenv_version --skip-existing
pyenv virtualenv $pyenv_version $project
pyenv local $project
fi

pyenv activate $project

pip install -r requirements.txt

(cd src && npm install)
9 changes: 6 additions & 3 deletions scripts/publish_npm_package.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,16 @@
from pathlib import Path
from publish_tools import ansible_utils
from publish_tools import npm_utils
from publish_tools import version_utils

root_directory = Path(__file__).parent.parent
secrets = ansible_utils.load_vars(sys.argv[2], root_directory / 'vars/vault.yaml')
secrets = ansible_utils.load_vars(sys.argv[2], root_directory / "vars/vault.yaml")
version = version_utils.get_version(src=root_directory, tag_prefix="version")

npm_utils.publish_npm_package(
src=root_directory,
tag_prefix="version",
npm_access_token=secrets['npm_access_token'],
github_access_token=sys.argv[1]
version=version,
npm_access_token=secrets["npm_access_token"],
github_access_token=sys.argv[1],
)

0 comments on commit 695c088

Please sign in to comment.