Skip to content

Commit

Permalink
feat: prepare to add all features to all fleets (#302)
Browse files Browse the repository at this point in the history
* feat: prepare to add all features to all fleets

Dashboard is going EOL. Prepare to move

* Update test_sbc.py

* Update pyproject.toml
  • Loading branch information
shawaj authored Jan 18, 2025
1 parent c85b2c7 commit 35f1ba2
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
9 changes: 5 additions & 4 deletions hm_pyhelper/sbc.py
Original file line number Diff line number Diff line change
Expand Up @@ -220,11 +220,12 @@ def is_commercial_fleet() -> bool:
'''
Return true if the device is in a commercial fleet. Otherwise return false.
'''
fleet_name = os.environ.get('BALENA_APP_NAME')
fleet_id = int(os.environ.get('BALENA_APP_ID'))
# all fleets will get commercial software
# fleet_name = os.environ.get('BALENA_APP_NAME')
# fleet_id = int(os.environ.get('BALENA_APP_ID'))

if not fleet_name.endswith('-c') or fleet_id not in COMMERCIAL_FLEETS:
return False
# if not fleet_name.endswith('-c') or fleet_id not in COMMERCIAL_FLEETS:
# return False

return True

Expand Down
2 changes: 1 addition & 1 deletion hm_pyhelper/tests/test_sbc.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,4 @@ def test_is_commercial_fleet_true(self):
@patch.dict('os.environ', {"BALENA_APP_NAME": "test"})
@patch.dict('os.environ', {"BALENA_APP_ID": "8700"})
def test_is_commercial_fleet_false(self):
self.assertFalse(is_commercial_fleet())
self.assertTrue(is_commercial_fleet())
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "poetry.core.masonry.api"

[tool.poetry]
name = "hm_pyhelper"
version = "0.14.37"
version = "0.14.38"
description = "Helium Python Helper"
authors = ["Nebra Ltd <[email protected]>"]
readme = "README.md"
Expand Down

0 comments on commit 35f1ba2

Please sign in to comment.