forked from Rockbox/rockbox
-
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #101 from tsirysndr/fluentci-deb-rpm
ci: add fluentci functions for generating deb and rpm files
- Loading branch information
Showing
2 changed files
with
190 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,3 +17,117 @@ pub fn detect_system() -> Result<(String, String), Error> { | |
|
||
Ok((os.into(), arch.into())) | ||
} | ||
|
||
pub fn download_release(version: String) -> Result<String, Error> { | ||
dag() | ||
.pipeline("mkdir")? | ||
.pkgx()? | ||
.with_exec(vec!["rm", "-rf", "/tmp/rbrelease"])? | ||
.with_exec(vec!["mkdir", "/tmp/rbrelease"])? | ||
.stdout()?; | ||
|
||
let stdout = dag() | ||
.pipeline("download-release")? | ||
.pkgx()? | ||
.with_workdir("/tmp/rbrelease")? | ||
.with_exec(vec!["pkgx", "[email protected]", &format!("https://github.com/tsirysndr/rockbox-zig/releases/download/{}/rockbox_{}_x86_64-linux.tar.gz", version, version)])? | ||
.with_exec(vec!["pkgx", "[email protected]", &format!("https://github.com/tsirysndr/rockbox-zig/releases/download/{}/rockboxd_{}_x86_64-linux.tar.gz", version, version)])? | ||
.with_exec(vec!["pkgx", "[email protected]", &format!("https://github.com/tsirysndr/rockbox-zig/releases/download/{}/rockbox-codecs-{}-x86_64-linux.tar.gz", version, version)])? | ||
.with_exec(vec!["pkgx", "[email protected]", &format!("https://github.com/tsirysndr/rockbox-zig/releases/download/{}/rockbox-assets-{}-x86_64-linux.tar.gz", version, version)])? | ||
.with_exec(vec!["pkgx", "[email protected]", &format!("https://github.com/tsirysndr/rockbox-zig/releases/download/{}/rockbox_{}_aarch64-linux.tar.gz", version, version)])? | ||
.with_exec(vec!["pkgx", "[email protected]", &format!("https://github.com/tsirysndr/rockbox-zig/releases/download/{}/rockboxd_{}_aarch64-linux.tar.gz", version, version)])? | ||
.with_exec(vec!["pkgx", "[email protected]", &format!("https://github.com/tsirysndr/rockbox-zig/releases/download/{}/rockbox-codecs-{}-aarch64-linux.tar.gz", version, version)])? | ||
.with_exec(vec!["pkgx", "[email protected]", &format!("https://github.com/tsirysndr/rockbox-zig/releases/download/{}/rockbox-assets-{}-aarch64-linux.tar.gz", version, version)])? | ||
.with_exec(vec!["mkdir", "-p", "amd64/bin", "amd64/lib/rockbox", "amd64/share/rockbox", "arm64/bin", "arm64/lib/rockbox", "arm64/share/rockbox"])? | ||
.stdout()?; | ||
|
||
dag() | ||
.pipeline("extract-bin-amd64")? | ||
.pkgx()? | ||
.with_workdir("/tmp/rbrelease/amd64/bin")? | ||
.with_exec(vec![ | ||
"tar", | ||
"xzvf", | ||
&format!("/tmp/rbrelease/rockbox_{}_x86_64-linux.tar.gz", version), | ||
])? | ||
.with_exec(vec![ | ||
"tar", | ||
"xzvf", | ||
&format!("/tmp/rbrelease/rockboxd_{}_x86_64-linux.tar.gz", version), | ||
])? | ||
.stdout()?; | ||
|
||
dag() | ||
.pipeline("extract-lib-amd64")? | ||
.pkgx()? | ||
.with_workdir("/tmp/rbrelease/amd64/lib/rockbox")? | ||
.with_exec(vec![ | ||
"tar", | ||
"xzvf", | ||
&format!( | ||
"/tmp/rbrelease/rockbox-codecs-{}-x86_64-linux.tar.gz", | ||
version | ||
), | ||
])? | ||
.stdout()?; | ||
|
||
dag() | ||
.pipeline("extract-share-amd64")? | ||
.pkgx()? | ||
.with_workdir("/tmp/rbrelease/amd64/share/rockbox")? | ||
.with_exec(vec![ | ||
"tar", | ||
"xzvf", | ||
&format!( | ||
"/tmp/rbrelease/rockbox-assets-{}-x86_64-linux.tar.gz", | ||
version | ||
), | ||
])? | ||
.stdout()?; | ||
|
||
dag() | ||
.pipeline("extract-bin-arm64")? | ||
.pkgx()? | ||
.with_workdir("/tmp/rbrelease/arm64/bin")? | ||
.with_exec(vec![ | ||
"tar", | ||
"xzvf", | ||
&format!("/tmp/rbrelease/rockbox_{}_aarch64-linux.tar.gz", version), | ||
])? | ||
.with_exec(vec![ | ||
"tar", | ||
"xzvf", | ||
&format!("/tmp/rbrelease/rockboxd_{}_aarch64-linux.tar.gz", version), | ||
])? | ||
.stdout()?; | ||
|
||
dag() | ||
.pipeline("extract-lib-arm64")? | ||
.pkgx()? | ||
.with_workdir("/tmp/rbrelease/arm64/lib/rockbox")? | ||
.with_exec(vec![ | ||
"tar", | ||
"xzvf", | ||
&format!( | ||
"/tmp/rbrelease/rockbox-codecs-{}-aarch64-linux.tar.gz", | ||
version | ||
), | ||
])? | ||
.stdout()?; | ||
|
||
dag() | ||
.pipeline("extract-share-arm64")? | ||
.pkgx()? | ||
.with_workdir("/tmp/rbrelease/arm64/share/rockbox")? | ||
.with_exec(vec![ | ||
"tar", | ||
"xzvf", | ||
&format!( | ||
"/tmp/rbrelease/rockbox-assets-{}-aarch64-linux.tar.gz", | ||
version | ||
), | ||
])? | ||
.stdout()?; | ||
|
||
Ok(stdout) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters