Skip to content

Commit

Permalink
Merge pull request #246 from AkshatBajaj/feature/version-project
Browse files Browse the repository at this point in the history
FEATURE: Implement a standard approach for versioning a project [CON-548]
  • Loading branch information
ucokzeko authored Dec 3, 2020
2 parents 6805706 + 377192c commit 24a8f9a
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 3 deletions.
1 change: 0 additions & 1 deletion codefresh.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@ steps:
- python3 setup.py test

# Run pylint tests
- pip install pylint==2.4.3
- pylint setup.py
- find surround_cli/ -iname "*.py" | xargs pylint

Expand Down
3 changes: 2 additions & 1 deletion surround/surround/project.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@
("dodo.py", "web_dodo.py.txt", False, True),
("Dockerfile", "Dockerfile.txt", False, False),
("{project_name}/config.yaml", "config.yaml.txt", False, False),
(".gitignore", ".gitignore.txt", False, False)
(".gitignore", ".gitignore.txt", False, False),
("VERSION", "VERSION.txt", False, False)
]
}
}
1 change: 1 addition & 0 deletions surround_cli/templates/new/VERSION.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
0.0.1
8 changes: 7 additions & 1 deletion surround_cli/templates/new/web_runner.py.txt
Original file line number Diff line number Diff line change
Expand Up @@ -59,4 +59,10 @@ class InfoHandler(tornado.web.RequestHandler):
self.assembler = assembler

def get(self):
self.write({{'version': '0.0.1'}})
self.write({{'version': self.get_version()}})

def get_version(self):
with open('VERSION') as version_file:
VERSION = version_file.read().strip()

return VERSION

0 comments on commit 24a8f9a

Please sign in to comment.