Git Product home page Git Product logo

wbld's Introduction

WBLD

WBLD is a Discord bot that builds WLED firmware. The scope of the bot is simple: Build WLED firmware based on builtin environments or custom configurations and give the binary file via Discord.

You can use the bot in the #bot channel of the WLED Disord server: https://discord.gg/KuqP7NE

Commands

There are two primary commands. If version is not specified it defaults to the current main branch:

./build builtin <environment> [version]

The builtin command builds a firmware based on existing environments defined in platformio.ini. For example, the following will build a d1_mini firmware based on version 0.10.2:

./build builtin d1_mini v0.10.2

./build custom [version]

The custom command builds a PlatformIO configuration snippet. This can help build firmware with specific supported usermods, custom pins, or other settings defined in macros. For example, the following will build a firmware for the QuinLED-Dig-Uno with temperature sensor usermod based the main branch:

./build custom

Then paste the following configuration:

[env:quinled_dig_uno]
extends = env:d1_mini
build_flags = ${common.build_flags_esp8266}
  -D USERMOD_DALLASTEMPERATURE
  -D USERMOD_DALLASTEMPERATURE_CELSIUS
lib_deps = ${env.lib_deps}
  milesburton/DallasTemperature@^3.9.0
  OneWire@~2.3.5

wbld's People

Contributors

andyshinn avatar mrooney avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

srg74 mrooney

wbld's Issues

Notify user when build completed

Aircoookie Yesterday at 5:24 AM
@andyshinn just a tiny suggestion for WBLD. I don't know if it would work well with the discord permission system, but it could be cool if the bot @mentioned the user that requested the binary on build completion. Just a little quality of life improvement, don't spend too much time on it ๐Ÿ˜‚

Add restart command (enhancement)

Maybe add a restart command to restart the bot, if it gets stuck on a error like "Command raised an exception: FileNotFoundError: [Errno 2] No such file or directory". (if that is possible)

Limit the use to a certain role like the Moderators, so there is a less likely chance of a malicious use.
That way the bot can be used, even if you are away for a longer time.

Save previous builds for retrieval

  • Set a UUID per build
  • Save the builds stdtout / stderr
  • Allow retrieval of firmware and logs by UUID
  • Commands to list previous builds UUIDs

Change default branch to main

On 02.04.2022 Aircookie renamed the 'master' brench to 'main'
To make the usage of the bot easier, the default branch should be changed to 'main'

My uneducated guess is, that the default in the functions here and here has to be changed to make this change.
(wbld/cogs/wbld.py Line 159 and Line 171)

Log capturing of build run doesn't work

The redirect_stdout and redirect_stderr context managers don't seem to be working properly. They only capture some data (stderr?). Possibly buffering or flushing issue?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.