All Projects β†’ willowtreeapps β†’ ukor

willowtreeapps / ukor

Licence: Apache-2.0 license
A Roku build tool with support for build flavors

Programming Languages

Brightscript
28 projects
javascript
184084 projects - #8 most used programming language
shell
77523 projects

Projects that are alternatives of or similar to ukor

Aria2 Build Msys2
aria2 build scripts on msys2 with custom patches.
Stars: ✭ 112 (+148.89%)
Mutual labels:  build, build-tool
Baumeister
πŸ‘· The aim of this project is to help you to build your things. From Bootstrap themes over static websites to single page applications.
Stars: ✭ 171 (+280%)
Mutual labels:  build, build-tool
Please
High-performance extensible build system for reproducible multi-language builds.
Stars: ✭ 1,856 (+4024.44%)
Mutual labels:  build, build-tool
Projectbuilder
A tool for easy automating and customizing build process for Unity.
Stars: ✭ 80 (+77.78%)
Mutual labels:  build, build-tool
Earthly
Repeatable builds
Stars: ✭ 5,805 (+12800%)
Mutual labels:  build, build-tool
Postinstall Build
Helper for conditionally building your npm package on postinstall
Stars: ✭ 87 (+93.33%)
Mutual labels:  build, build-tool
Arduino Cmake Ng
CMake-Based framework for Arduino platforms
Stars: ✭ 123 (+173.33%)
Mutual labels:  build, build-tool
Gogradle
A Gradle Plugin Providing Full Support for Go
Stars: ✭ 712 (+1482.22%)
Mutual labels:  build, build-tool
Mbt
The most flexible build tool for monorepo
Stars: ✭ 184 (+308.89%)
Mutual labels:  build, build-tool
Build
B2 makes it easy to build C++ projects, everywhere.
Stars: ✭ 182 (+304.44%)
Mutual labels:  build, build-tool
Dawn
πŸŒ… Dawn is a lightweight task management and build tool for front-end and nodejs.
Stars: ✭ 1,057 (+2248.89%)
Mutual labels:  build, build-tool
aseprite-macos-buildsh
Automated script to create latest release app (either beta, or release whichever is newer) of Aseprite for macOS
Stars: ✭ 143 (+217.78%)
Mutual labels:  build, build-tool
Hopp
Crazy rapid build system.
Stars: ✭ 24 (-46.67%)
Mutual labels:  build, build-tool
Pybuilder
Software build automation tool for Python.
Stars: ✭ 1,290 (+2766.67%)
Mutual labels:  build, build-tool
Cargo Make
Rust task runner and build tool.
Stars: ✭ 895 (+1888.89%)
Mutual labels:  build, build-tool
Nginx Builder
A tool to build deb or rpm package of required Nginx version from the source code, with the ability to connect third-party modules. Nginx parameters are set in the yaml configuration file.
Stars: ✭ 123 (+173.33%)
Mutual labels:  build, build-tool
Gowatch
πŸš€ gowatch is a command line tool that builds and (re)starts your go project everytime you save a Go or template file.
Stars: ✭ 539 (+1097.78%)
Mutual labels:  build, build-tool
Flubucore
A cross platform build and deployment automation system for building projects and executing deployment scripts using C# code.
Stars: ✭ 695 (+1444.44%)
Mutual labels:  build, build-tool
Zeus
An Electrifying Build System
Stars: ✭ 176 (+291.11%)
Mutual labels:  build, build-tool
Build Harness
πŸ€–Collection of Makefiles to facilitate building Golang projects, Dockerfiles, Helm charts, and more
Stars: ✭ 236 (+424.44%)
Mutual labels:  build, build-tool


Ukor

A build tool for Roku projects

Features:

  • Multiple flavors
  • Install to device
  • Project and local configuration properties
  • Save installation targets and authentication details
  • Set default install targets
  • Search for Rokus on your local network

Questions?

Join us in the #tooling channel on the Roku Developers Slack.

Requirements

  • Node v7.6 or higher.

Project setup

You can install Ukor via NPM.

npm install -g @willowtreeapps/ukor

A Ukor project is organized in a single src folder with properties files in order to configure Ukor. The src folder contains a single main folder which contain the default built sources, optional customized flavor sources as well as test sources.

/Project
- src/
  - main/
    - components/
    - source/
    - anyThingYouWant/
    - constants.yaml
  - flavor1/
  - flavor2/
  - test/
  - testflavor1/
- ukor.properties
- ukor.local

The ukor.properties file is the main ukor configuration file for the project and should be version controlled. The ukor.local file is a local properties file that contains local customizations for ukor overriding the ukor.properties file. This file is not expected to be version controlled.

The constants.yaml file is per-flavor. In the file, you can define strings (or even any text to insert into a file), and can be identified with @{some.category.id} in brightscript OR xml source files.

Example properties (yaml)

buildDir: 'build'
sourceDir: 'src'
preBuild: 'scripts/main.js'
mainFlavor: 'flavorName'
flavors: {
  flavorName: {
    src: ['flavor', 'main']
  },
  flavorNameRelease: {
    base: 'flavorName',
    src: ['release']
  }
}
rokus: {
  roku2: {
    serial: '123123123',
    auth: {
      user: 'rokudev',
      pass: 'YourPassword'
    }
  }
}

Constants

Each flavor can contain string resources specified in the YAML format by providing constants.yaml file. Strings can be referenced by their path specified in any .xml or .brs source files. For example,

Given a constants.yaml file:

strings:
  contactSupport: 'contact support at 555-555-5555'
  login:
    signIn: 'Sign in now!'

Strings can be references in a *.brs file using the following interpolation syntax @{ <your_resource_here> }. For example,

supportLabel.text = "@{strings.contactSupport}"
loginLabel.text = "@{strings.login.signIn}"

The final generated *.brs source file will have the strings inlined like so.

supportLabel.text = "contact support at 555-555-555"
loginLabel.text = "Sign in now!"

Usage

Usage: ukor [options] [command]


  Commands:

    make [flavors...]             Bundle your channel into a zip to the build directory
    install [flavor] [roku] [-c]  Bundle then deploy your channel to a named roku
    package <flavor> <roku>       Package a channel flavor with a roku device
    rekey <roku>                  Rekey your device (an packageReference is required)
    lint <flavor>                 Lint a channel flavor
    console [roku]                Launch the Telnet console for the named roku
    debugger [roku]               Launch the Telnet debugger for the named roku
    find                          Search for rokus on the network
    init [flavors...]             Initialize a ukor project
    test                          Run the tests
    validate                      Validate ukor.properties and ukor.local
    help [cmd]                    display help for [cmd]

  Options:

    -h, --help     output usage information

    -v, --verbose  Turn on verbose logging

Quick reference

  • I want to make a new project
ukor init
  • I want to build my project
ukor make [flavor]
  • I want to install my project on a device
ukor install [flavor] [device]

or

ukor install [flavor] [ip address] --auth=[username]:[password]
  • I want to package my project using a device
ukor package [flavor] [device]

or

ukor package [flavor] [ip address] --auth=[username]:[password]
  • I want to rekey my device
ukor rekey [device]

or

ukor package [ip address] --auth=[username]:[password]

NOTE: you will need to define a packageReference and packageKey in ukor.properties.yaml. packageReference represent device id and packageKey does for password

Testing

Ukor uses UnitTestFramework.brs as part of its unit test runner and test reporting feature. This is especially useful if you plan on having Continuous Integration as part of your workflow.

Setup

First, copy the modified UnitTestFramework.brs in lib/brs/ to your src/test/source/ folder, so it loads at startup for when testing.

Note that the original UnitTestFramework.brs can be found here

Next, dd the following snippet in your startup function, after screen.show() but before the event loop

if params.RunTests = "true"
  runner = TestRunner()
  if params.host <> invalid
    runner.logger.SetServer(params.host, params.port)
  else
    runner.logger.SetServerURL(params.url)
  end if
  ' other setup if needed
  runner.run()
end if

You should now be able to execute your test suite using the test command.

ukor test [flavor] [roku]

What's happening?

Basically, we modified the rokudev UnitTestFramework.brs file to make a JSON of test results, and then POST that to the specified server. ukor test [flavor] builds and deploys the specified flavor with the test src folder, and then restarts the channel with parameters to run tests and point the results to the client machine. ukor will log the results, and also output results in xml and junit format to .out/tests/ukorTests.[xml|junit].

notes:

  • Ukor now copies UnitTestFramework.brs with ukor init!
  • UnitTestFramework.brs is now up to date with the rokudev repo!

Contributing to Ukor

Contributions and suggestions are more than welcome. Please see our Code of Conduct as well as our Contributing Guidelines for more information.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].