Skip to content

Commit 7038b31

Browse files
authored
Merge pull request #8 from Windham-High-School/3-versioning-system
Created versioning structure similar to CubeServer
2 parents 3c2f4a4 + d7905fb commit 7038b31

File tree

5 files changed

+10
-0
lines changed

5 files changed

+10
-0
lines changed

package.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
#!/usr/bin/env bash
22

3+
./update_version.sh
34
zip -r cubeserver-api-python.zip . -x .gitignore -x ./.git 2>&1 > /dev/null
45
echo cubeserver-api-python.zip

servercom/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
Supported implementations: cpython, circuitpython
55
"""
66

7+
from ._version import *
78
from sys import implementation as _implementation
89

910

servercom/_version.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
__version__ = "v0.2.0-beta"

update_version.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#!/usr/bin/env bash
2+
3+
VERSION=$(cat ./version.txt)
4+
VERSION_STR="__version__ = \"$VERSION\""
5+
6+
echo $VERSION_STR > ./servercom/_version.py

version.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
v0.2.0-beta

0 commit comments

Comments
 (0)