Skip to content

Commit

Permalink
Release v0.1.5
Browse files Browse the repository at this point in the history
Signed-off-by: Xavier Lau <[email protected]>
  • Loading branch information
aurexav committed Dec 24, 2024
1 parent 9d01d97 commit 2b4d40b
Show file tree
Hide file tree
Showing 7 changed files with 37 additions and 11 deletions.
25 changes: 23 additions & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,13 @@ edition = "2021"
homepage = "https://hack.ink/polkadot-runtime-releaser"
license = "GPL-3.0"
repository = "https://github.com/hack-ink/polkadot-runtime-releaser"
version = "0.1.4"
version = "0.1.5"

[workspace.dependencies]
# crates.io
anyhow = { version = "1.0" }
array-bytes = { version = "8.0" }
atty = { version = "0.2" }
blake2 = { version = "0.10" }
chrono = { version = "0.4" }
clap = { version = "4.5" }
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ FROM ubuntu:25.04

LABEL maintainer="[email protected]"
LABEL description="An environment for constructing a deterministic polkadot-sdk-based runtime."
LABEL version="0.1.4"
LABEL version="0.1.5"

RUN apt-get update && \
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
Expand Down
2 changes: 1 addition & 1 deletion action/build/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ runs:
- name: Setup Polkadot Runtime Releaser
shell: bash
run: curl
-L https://github.com/hack-ink/polkadot-runtime-releaser/releases/download/v0.1.4/prr-x86_64-unknown-linux-gnu.tar.gz |
-L https://github.com/hack-ink/polkadot-runtime-releaser/releases/download/v0.1.5/prr-x86_64-unknown-linux-gnu.tar.gz |
tar xz &&
chmod u+x prr &&
mv prr /usr/local/bin/prr
Expand Down
8 changes: 4 additions & 4 deletions cli/src/cli/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ pub struct BuildCmd {
runtime: String,
/// The features to enable for the runtime crate.
#[arg(long, short, value_name = "FEATURES")]
features: String,
features: Option<String>,
/// Whether to store the compressed runtime only.
#[arg(long)]
no_compressed_only: bool,
Expand All @@ -28,7 +28,7 @@ pub struct BuildCmd {
#[arg(long, short, value_name = "VER", verbatim_doc_comment)]
toolchain_version: Option<String>,
/// Image version of the <ghcr.io/hack-ink/polkadot-runtime-releaser>.
#[arg(long, short = 'v', value_name = "VER", default_value_t = String::from("0.1.4"), conflicts_with = "override_docker_image")]
#[arg(long, short = 'v', value_name = "VER", default_value_t = String::from("0.1.5"), conflicts_with = "override_docker_image")]
image_version: String,
/// Overwrite the default docker image with the specified one.
/// Use `docker images` to list the available images on your system.
Expand Down Expand Up @@ -115,9 +115,9 @@ impl Run for BuildCmd {

let mut cmd = vec!["cargo", "b", "-r", "--locked", "-p", &runtime];

if !features.is_empty() {
if let Some(feat) = &features {
cmd.push("--features");
cmd.push(&features);
cmd.push(feat);
}

run_args.with_command(&cmd);
Expand Down
1 change: 1 addition & 0 deletions lib/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ version.workspace = true

[dependencies]
# crates.io
atty = { workspace = true }
blake2 = { workspace = true }
frame-metadata = { workspace = true }
md-5 = { workspace = true }
Expand Down
7 changes: 5 additions & 2 deletions lib/src/docker.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
//! Polkadot Runtime Releaser Docker component.
// crates.io
use atty::Stream;
// self
use crate::{
prelude::*,
Expand Down Expand Up @@ -50,7 +52,8 @@ impl<'a> RunArgs<'a> {
}
impl CliArgs for RunArgs<'_> {
fn to_cli_args(&self) -> Vec<&str> {
let mut args = vec!["run", "-it", "--rm"];
let maybe_it = if atty::is(Stream::Stdin) { "-it" } else { "-t" };
let mut args = vec!["run", maybe_it, "--rm"];

for env in &self.envs {
args.extend_from_slice(&["-e", env]);
Expand Down Expand Up @@ -81,7 +84,7 @@ fn to_cli_args_should_work() {
cli_args,
vec![
"run",
"-it",
"-t",
"--rm",
"-e",
"FOO=bar",
Expand Down

0 comments on commit 2b4d40b

Please sign in to comment.