mirror of
https://github.com/Tygs/0bin.git
synced 2023-08-10 21:13:00 +03:00
Compare commits
7 Commits
Author | SHA1 | Date | |
---|---|---|---|
c65d5c4d09 | |||
3b3cae831a | |||
3e0c4da193 | |||
ab10db69b4 | |||
ff6fc227eb | |||
dff881ee90 | |||
8ce3793ff6 |
@ -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
23
dodo.py
@ -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")
|
||||
|
@ -1 +1 @@
|
||||
1.0.3
|
||||
1.0.5
|
@ -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)
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user