Преглед изворни кода

Update bump version for web-extension

tags/web-extension-v9.6.4
Guillaume Vincent пре 2 година
родитељ
комит
6f9c7fca66
3 измењених фајлова са 37 додато и 19 уклоњено
  1. +0
    -3
      .github/workflows/lesspass-web-extension-publish.yml
  2. +37
    -11
      bin/bump_version.py
  3. +0
    -5
      packages/lesspass-web-extension/.gitignore

+ 0
- 3
.github/workflows/lesspass-web-extension-publish.yml Прегледај датотеку

@@ -14,9 +14,6 @@ jobs:
with:
node-version: "14"
- run: yarn install
- run: yarn workspace lesspass-crypto build
- run: yarn workspace lesspass-pure build
- run: yarn workspace lesspass-web-extension build
- run: yarn workspace lesspass-web-extension release
continue-on-error: true
env:


+ 37
- 11
bin/bump_version.py Прегледај датотеку

@@ -23,6 +23,21 @@ def print_packages_version(packages):
print(f"|{printable_package_name}|{version.rjust(9, ' ')}|")


def get_package_version(package):
with open(os.path.join(root_path, "packages", package, "package.json")) as f:
package_json = json.load(f)
return package_json["version"]


def set_version(file_path, version):
with open(file_path) as f:
package_json = json.load(f)
package_json["version"] = version

with open(file_path, "w", encoding="utf-8") as f:
json.dump(package_json, f, ensure_ascii=False, indent=2)


if __name__ == "__main__":
if len(sys.argv) != 3:
usage()
@@ -56,17 +71,28 @@ if __name__ == "__main__":
if has_error:
usage()

print_packages_version(packages)

package_short_name = packages[package]
subprocess.run(
["yarn", "config", "set", "version-tag-prefix", f"{package_short_name}-v"]
)
subprocess.run(
["yarn", "config", "set", "version-git-message", f"{package_short_name}-v%s"]
[
"yarn",
"workspace",
f"{package}",
"version",
f"--{bump}",
"--no-git-tag-version",
"--no-commit-hooks",
]
)
subprocess.run(["yarn", "workspace", f"{package}", "version", f"--{bump}"])
subprocess.run(["yarn", "config", "set", "version-tag-prefix", "v"])
subprocess.run(["yarn", "config", "set", "version-git-message", "v%s"])

print_packages_version(packages)
if package == "lesspass-web-extension":
version = get_package_version(package)
set_version(
os.path.join(root_path, "packages", package, "extension", "manifest.json"),
version,
)
subprocess.run(["yarn", "workspace", "lesspass-crypto", "build"])
subprocess.run(["yarn", "workspace", "lesspass-pure", "build"])
subprocess.run(["yarn", "workspace", "lesspass-web-extension", "build"])
subprocess.run(["git", "add", "."])
tag = f"{package_short_name}-v{version}"
subprocess.run(["git", "commit", "-a", "-m", tag])
subprocess.run(["git", "tag", tag])

+ 0
- 5
packages/lesspass-web-extension/.gitignore Прегледај датотеку

@@ -1,6 +1 @@
build/
extension/fonts
extension/img
extension/favicon.ico
extension/index.html
extension/lesspass.min.*

Loading…
Откажи
Сачувај