Add launch arg to clear
This commit is contained in:
1 parent
ee3312763d
commit
6b47440cb5
3 files changed
+26
-2
No files matched your search
+8
-2
@@ -294,14 +294,20 @@ This is mostly useful to QA the `canary` release (see [Canary release](https://e
|
|||||||
|
|
||||||
#### In case of a softlock
|
#### In case of a softlock
|
||||||
|
|
||||||
If the dev menu is used to load a custom Playlet lib url, but the lib does not have a functionality to revert back:
|
If the dev menu is used to load a custom Playlet lib url, but you couldn't revert back:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
curl -d '' "http://$ROKU_DEV_TARGET:8060/launch/dev?clearPlayletLibUrls=true"
|
curl -d '' "http://$ROKU_DEV_TARGET:8060/launch/693751?clearPlayletLibUrls=true"
|
||||||
```
|
```
|
||||||
|
|
||||||
This will remove the custom lib, and revert to using default (latest release from Github).
|
This will remove the custom lib, and revert to using default (latest release from Github).
|
||||||
|
|
||||||
|
If you need to clear all the data from the registry, use
|
||||||
|
|
||||||
|
```bash
|
||||||
|
curl -d '' "http://$ROKU_DEV_TARGET:8060/launch/693751?clearRegistry=true"
|
||||||
|
```
|
||||||
|
|
||||||
## CI/CD
|
## CI/CD
|
||||||
|
|
||||||
On pull requests, a Github action will run `lint:fix` and `format:fix` and push changes to the PR branch, to keep things tidy.
|
On pull requests, a Github action will run `lint:fix` and `format:fix` and push changes to the PR branch, to keep things tidy.
|
||||||
|
|||||||
@@ -22,6 +22,7 @@ function Main(args as object) as void
|
|||||||
Logger.Init()
|
Logger.Init()
|
||||||
|
|
||||||
Registry.ClearPlayletLibUrlsIfNeeded(args)
|
Registry.ClearPlayletLibUrlsIfNeeded(args)
|
||||||
|
Registry.ClearRegistryIfNeeded(args)
|
||||||
|
|
||||||
scene = screen.CreateScene("BootstrapScene")
|
scene = screen.CreateScene("BootstrapScene")
|
||||||
screen.show()
|
screen.show()
|
||||||
|
|||||||
@@ -14,6 +14,15 @@ namespace Registry
|
|||||||
sec.Flush()
|
sec.Flush()
|
||||||
end function
|
end function
|
||||||
|
|
||||||
|
function DeleteAll()
|
||||||
|
reg = CreateObject("roRegistry")
|
||||||
|
sectionNames = reg.GetSectionList()
|
||||||
|
for each sectionName in sectionNames
|
||||||
|
reg.Delete(sectionName)
|
||||||
|
end for
|
||||||
|
reg.Flush()
|
||||||
|
end function
|
||||||
|
|
||||||
function GetPlayletLibUrlsFromRegistry() as object
|
function GetPlayletLibUrlsFromRegistry() as object
|
||||||
urlsJson = ReadKey("playlet_lib_urls", "Playlet")
|
urlsJson = ReadKey("playlet_lib_urls", "Playlet")
|
||||||
if urlsJson = invalid
|
if urlsJson = invalid
|
||||||
@@ -31,4 +40,12 @@ namespace Registry
|
|||||||
Logger.Log("Cleared key playlet_lib_urls from registry")
|
Logger.Log("Cleared key playlet_lib_urls from registry")
|
||||||
end function
|
end function
|
||||||
|
|
||||||
|
function ClearRegistryIfNeeded(launchArgs as object) as void
|
||||||
|
if launchArgs = invalid or launchArgs.clearRegistry = invalid
|
||||||
|
return
|
||||||
|
end if
|
||||||
|
DeleteAll()
|
||||||
|
Logger.Log("Cleared all data from registry")
|
||||||
|
end function
|
||||||
|
|
||||||
end namespace
|
end namespace
|
||||||
Reference in new issue
Block a user