1
0
mirror of https://github.com/Tygs/0bin.git synced 2023-08-10 21:13:00 +03:00

7 Commits
v2 ... master

Author SHA1 Message Date
c65d5c4d09 Merge pull request #142 from shashwata27/master
Fixing Typo
2021-03-28 22:00:55 +02:00
3b3cae831a Fixing Typo 2021-03-28 17:06:22 +05:30
3e0c4da193 Removing debug code from dodo file 2020-08-31 17:35:33 +02:00
ab10db69b4 Bumping to version 1.0.5 2020-08-31 17:25:50 +02:00
ff6fc227eb Fix bug with pyz release on 3.8 2020-08-31 17:25:18 +02:00
dff881ee90 Bumping to version 1.0.4 2020-08-31 17:20:07 +02:00
8ce3793ff6 Changing repo status checking strategy, again, again 2020-08-31 16:30:05 +02:00
4 changed files with 19 additions and 10 deletions

View File

@ -1,7 +1,7 @@
0bin: a client side encrypted pastebin
===========================================
0bin is a pastebin that encrypts the user content in the browsder and can run without a database.
0bin is a pastebin that encrypts the user content in the browser and can run without a database.
* Try it: `0bin.net <http://0bin.net>`_
* `Report a bug <https://github.com/sametmax/0bin/issues>`_

23
dodo.py
View File

@ -1,8 +1,8 @@
import sys
import subprocess
from pathlib import Path
from fnmatch import fnmatch
from subprocess import check_output, STDOUT
from doit.tools import PythonInteractiveAction
@ -23,9 +23,9 @@ DOIT_CONFIG = {
}
def git(*args):
return check_output(
["git", *args], stderr=STDOUT, timeout=3, universal_newlines=True,
def git(*args, **kwargs):
return subprocess.check_output(
["git", *args], stderr=subprocess.STDOUT, universal_newlines=True,
).rstrip("\n")
@ -77,13 +77,19 @@ def task_build():
def task_publish_to_pypi():
return {
"task_dep": ["build"],
"file_dep": [DIST_DIR / f"zerobin-{ZEROBIN_VERSION}-py3-none-any.whl"],
"actions": ["twine upload ./dist/*.whl"],
}
def task_build_pyz():
return {
"actions": ["shiv zerobin -o dist/zerobin.pyz -c zerobin"],
}
def task_bump_version():
def bump():
@ -91,7 +97,7 @@ def task_bump_version():
sys.exit("You must be on the branch master to do that")
git("fetch", "origin", "master")
if git("git", "rev-list", "HEAD...origin/master", "--count") != "0":
if git("rev-parse", "@{u}") != git("merge-base", "@", "@{u}"):
sys.exit("Cannot push a new version, you need to pull first")
git_status = git("status", "--porcelain=1").split("\n")
@ -122,7 +128,10 @@ def task_bump_version():
print("- Updating VERSION file")
(SOURCE_DIR / "VERSION").write_text(new_version)
print("- Commiting VERSION file")
git("commit", "-m", f"Bumping to version {new_version}")
git("add", "zerobin/VERSION")
git(
"commit", "-m", f"Bumping to version {new_version}",
)
print(f"- Adding v{new_version} tag")
git("tag", f"v{new_version}")
print("- Pushing tag")

View File

@ -1 +1 @@
1.0.3
1.0.5

View File

@ -64,7 +64,7 @@ class SettingsContainer(object):
Update settings with values from the given module file.
Uses update_with_dict() behind the scenes.
"""
params = run_path(filepath)
params = run_path(str(filepath))
return self.update_with_dict(params)