lbry-desktop/build/set_version.py

22 lines
515 B
Python
Raw Normal View History

2017-02-10 03:09:31 +01:00
"""Set the package version to the output of `git describe`"""
2017-04-21 19:09:02 +02:00
from __future__ import print_function
2017-02-10 03:09:31 +01:00
import os.path
import sys
2017-04-21 19:09:02 +02:00
import fileinput
2017-02-10 03:09:31 +01:00
def main():
2017-04-21 19:09:02 +02:00
filename = os.path.abspath(
os.path.join(os.path.abspath(__file__), '..', '..', 'ui', 'js', 'lbryio.js'))
for line in fileinput.input(filename, inplace=True):
if line.startswith(' enabled: false'):
print(' enabled: true')
else:
print(line, end='')
2017-02-10 03:09:31 +01:00
if __name__ == '__main__':
sys.exit(main())