Skip to content

Commit

Permalink
recover bump dev
Browse files Browse the repository at this point in the history
  • Loading branch information
czoido committed Dec 2, 2024
1 parent b992f08 commit cb9651d
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 0 deletions.
Empty file added .ci/__init__.py
Empty file.
22 changes: 22 additions & 0 deletions .ci/bump_dev_version.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
import os
import time


def replace_in_file(file_path, search, replace):
with open(file_path, "r") as handle:
content = handle.read()
if search not in content:
raise Exception("Incorrect development version in conan/__init__.py")
content = content.replace(search, replace)
content = content.encode("utf-8")
with open(file_path, "wb") as handle:
handle.write(content)

def bump_dev():
vfile = os.path.join(os.path.dirname(os.path.abspath(__file__)), "../conan/__init__.py")
snapshot = "%s" % int(time.time())
replace_in_file(vfile, "-dev'", "-dev%s'" % snapshot)


if __name__ == "__main__":
bump_dev()

0 comments on commit cb9651d

Please sign in to comment.