summaryrefslogtreecommitdiffstats
path: root/src/main.rs
AgeCommit message (Collapse)Author
2020-12-14Refactor: Move phase module to packageMatthias Beyer
This is the right scope anyways. Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2020-12-11Add "tree-of" subcommand to print dependency tree of a packageMatthias Beyer
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2020-12-11Refactor to find linter from repository rootMatthias Beyer
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2020-12-11Add "lint" subcommandMatthias Beyer
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2020-12-09Fix weird rendering bug of progress barsMatthias Beyer
Apparently, this fixes the rendering bug we had with indicatif. The issue was, that we called `indicatif::ProgressBar::set_message()` before the bar was added to the `indicatif::MultiProgress` object. This caused the bar to be rendered, and as soon we added it to the MultiProgress object and re-called set_message(), it was rendered again. This is of course a bug / inconveniance in indicatif. Either way, the issue was solved by not calling `set_message()` in our `ProgressBars` helper object, but only return a preconfigured bar object. Because not calling the set_message() function yields the whole bunch of helper functions as unnecessary, these were removed and the interface was boiled down to `pub fn ProgressBars::bar(&self) -> indicatif::ProgressBar` which in turn results in a few modifications all over the place. Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2020-12-09Make ProgressBars helper able to create spinnersMatthias Beyer
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2020-12-07Deny trivial numeric castsMatthias Beyer
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2020-12-07Deny macro_use from external crateMatthias Beyer
Diesel is an exception here, because the generated src/schema.rs file does not automatically contain the necessary imports. All imports were added where necessary. Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2020-12-07Add list of denied lintsMatthias Beyer
Enable only some of them, for starters. Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2020-12-07Remove unused variableMatthias Beyer
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2020-12-03Implement release subcommandMatthias Beyer
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2020-11-26Update dependency: clap: 3.0.0-beta.1 -> 3.0.0-beta.2Matthias Beyer
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2020-11-26Load config file path from repository root instead cwdMatthias Beyer
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2020-11-26Fix: Repo path should be cwd, not configurableMatthias Beyer
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2020-11-13Add flag to show script, highlighted automaticallyMatthias Beyer
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2020-11-11Add subcommand "source download"Matthias Beyer
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2020-11-11Move to have "source" subcommandMatthias Beyer
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2020-11-11Add command: verify-sourcesMatthias Beyer
This adds a command to hash-check all sources. Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2020-11-11Add source cache typesMatthias Beyer
This adds a module for source cache handling. Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2020-11-10Move DB cli interface to proper placeMatthias Beyer
This moves the DB CLI interface building code to src/cli.rs and the interface handling code to src/commands/db.rs Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2020-11-09Add CLI option to hide barsMatthias Beyer
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2020-11-09Add subcommand: find-pkgMatthias Beyer
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2020-11-09Add subcommand: env-ofMatthias Beyer
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2020-11-08Do not pass objects not neededMatthias Beyer
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2020-11-08Remove unused "mut" keywordMatthias Beyer
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2020-11-08Move command implementations into dedicated moduleMatthias Beyer
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2020-11-08Move package print format setting from CLI into config fileMatthias Beyer
We don't actually want to pass a print format as complex as the package list format on the CLI. Thus, move it to the configuration file. Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2020-11-08Remove unused imports, sort importsMatthias Beyer
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2020-11-08Fix: build_package_filter_by_dependency_name() filters can failMatthias Beyer
This fixes an issue with the build_package_filter_by_dependency_name() function, which generated a filters::filter::Filter<Package>. Though, these filters can fail because the dependency string it filters for must be parsed to be matched against. Because the `Package` type does not store the parsed information, but the "raw" string from the TOML, this parsing process is necessary. This patch changes the function to return a failable filter (a filter that returns `Result<bool>`). These results must be handled in the main() function (actually in the subcommand implementation), which is done in this patch as well. Tests were adapted accordingly, which required adding a proper version constraint string in the test Package instances. Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2020-11-08Add debug outputMatthias Beyer
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2020-11-07Merge branch 'progressbars'Matthias Beyer
2020-11-07Make build() less async, add progress barsMatthias Beyer
This patch removes some async subroutines from the build() implementation, which makes adding progress indication way less complex. The tree is now build syncronously, as is release and staging loading. Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2020-11-07Degrade ProgressBars to a simple progress-bar-generation helperMatthias Beyer
This patch removes the idea of having a "MultiProgress" object from indicativ available in the top level of butido. It turned out that the progress bars were not updated until the MultiProgress::join() method was called, which basically yields the progress bars useless. Thus, we remove the multi-progress-bar idea from top level. Later, we might implement a multi-progress bar viewing in the orchestrator, so we can see which job is progressed how far. Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2020-11-07Change progress bar format to be a configuration parameter.Matthias Beyer
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2020-11-07Remove progress bar from package file counting routineMatthias Beyer
This just adds output which is really not that important. So remove it. Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2020-11-07Implement versions-of <pkg> commandMatthias Beyer
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2020-11-07Add check whether requested image is presentMatthias Beyer
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2020-11-06Add logging output and error context messagesMatthias Beyer
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2020-11-06Finish implementation of build subcommandMatthias Beyer
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2020-11-06Let Image::create_or_fetch() take an &ImageName instead of &strMatthias Beyer
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2020-11-05Reorder build() impl, make use of async-awaitMatthias Beyer
This patch re-orderes the build() implementation. First goes everything that is not possible to run in parallel, such as commandline option fetching and so on. Then, we create all the futures we need to do things. Later, we collect them as needed, so we can run everything as late as possible. Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2020-11-05Add creating a submit object in the databaseMatthias Beyer
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2020-11-05Move create-or-fetch logic into functions on model typesMatthias Beyer
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2020-11-05Add inserting of image name into databaseMatthias Beyer
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2020-11-05Add inserting of git repo hash into databaseMatthias Beyer
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2020-11-05Add creating of the package entry in the databaseMatthias Beyer
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2020-11-05build() does only support building one packageMatthias Beyer
If we find multiple, we error out. Building multiple packages with one call should not be supported. Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2020-11-05Pass database connection to build() implementationMatthias Beyer
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2020-11-05Add repository cleanness check in UIMatthias Beyer
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2020-11-04Remove all non-equality "Version constraint" implementationMatthias Beyer
This patch removes the idea of "version constraints" except for the equality constraint. This is due to the fact, that everything else might result in impurities. This might be reverted in the future and actual operators ("<" or ">" or ranges...) might be implemented. Thus, we keep the "=" equality sign as prefix for a version string, to be extensible here. This commit also fixes (automatically, because the implementation changed from the ground up) the issue that there was no difference between a version string and a version constraint string. Signed-off-by: Matthias Beyer <mail@beyermatthias.de> (cherry picked from commit 7bbcca0356795ac60bf7761819b56430e0905a3c)