-
Notifications
You must be signed in to change notification settings - Fork 26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
twoliter: Create a test project #106
Conversation
8712fc7
to
903f011
Compare
use std::process::{exit, Command}; | ||
|
||
fn main() -> Result<(), std::io::Error> { | ||
let ret = Command::new("buildsys").arg("build-package").status()?; | ||
if !ret.success() { | ||
exit(1); | ||
} | ||
Ok(()) | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we inject these files via twoliter
? It'd be somewhat magical but would cut down on boilerplate.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't love the idea because someone might want to augment this code for their own purposes (pulling from a cache or generating some code, for example). On the other hand, without controlling this code, it is hard to update the calling pattern without breaking everyone.
One idea might be to vend a crates.io project that simplifies this down to:
fn main() -> Result<(), Error> {
buildsys::run()
}
This would also eliminate the need to vend buildsys as a binary. But, there would be a strict calling convention based on environment variables and some sort of version check to make sure the customer isn't using a too-old version of buildsys for Twoliter's expectations.
So Twoliter might pass BUILDSYS_REQUIRED_VERSION=v0.22
and buidsys might error Buildsys version v0.10.0 is not compatible with the current version of Twoliter, please update to version v0.22.0
.
/.git | ||
/.gomodcache | ||
/build/* | ||
!/build/rpms/ | ||
/build/rpms/* |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't love copying this file around but I'll clean it up in #102 assuming this merges first.
903f011
to
45f3827
Compare
45f3827
to
7bf1975
Compare
Issue number:
Closes #72
Description of changes:
Adds a new test project for OOTB. There are 2 packages included, one written in rust and the other in go.
Testing done:
This has been tested with #96
Terms of contribution:
By submitting this pull request, I agree that this contribution is dual-licensed under the terms of both the Apache License, version 2.0, and the MIT license.