lbry-desktop/build/set_version.py

22 lines
515 B
Python
Raw Normal View History

2017-02-09 20:09:31 -06:00
"""Set the package version to the output of `git describe`"""
2017-04-21 13:09:02 -04:00
from __future__ import print_function
2017-02-09 20:09:31 -06:00
import os.path
import sys
2017-04-21 13:09:02 -04:00
import fileinput
2017-02-09 20:09:31 -06:00
def main():
2017-04-21 13:09:02 -04: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-09 20:09:31 -06:00
if __name__ == '__main__':
sys.exit(main())