Skip to content

Commit

Permalink
Release v0.8.2
Browse files Browse the repository at this point in the history
  • Loading branch information
AurevoirXavier committed Jun 4, 2024
1 parent 43f2e1a commit ba8939d
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/watch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:

env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
OCVW_LINK: https://github.com/darwinia-network/darwinia-release/releases/download/v0.8.1/ocvw.zst
OCVW_LINK: https://github.com/darwinia-network/darwinia-release/releases/download/v0.8.2/ocvw.zst

jobs:
watch:
Expand Down
2 changes: 1 addition & 1 deletion on-chain-version-watcher/Cargo.lock

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

2 changes: 1 addition & 1 deletion on-chain-version-watcher/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
edition = "2021"
name = "ocvw"
version = "0.8.1"
version = "0.8.2"

[dependencies]
# crates.io
Expand Down
9 changes: 5 additions & 4 deletions on-chain-version-watcher/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ impl Watcher {
}

fn check_and_release(&self, network: &str) -> Result<()> {
let prerelease = network.starts_with("pango");
let prerelease = network.starts_with("koi");
let version_d = self
.github
.latest_darwinia_release_of("darwinia", None, prerelease)?;
Expand Down Expand Up @@ -125,7 +125,7 @@ impl GitHub {
let api = format!("https://api.github.com/repos/darwinia-network/{repository}/releases");
let releases = self.get::<Vec<GitHubRelease>>(&api)?;
let re = if prerelease {
Regex::new(r".*(pango-\d{4})").unwrap()
Regex::new(r".*(koi-\d{4})").unwrap()
} else {
Regex::new(r".*(v\d+\.\d+\.\d+(-\d+)?)").unwrap()
};
Expand Down Expand Up @@ -204,7 +204,8 @@ struct Version {

fn tag2spec_version(tag: &str, prerelease: bool) -> Result<u32> {
if prerelease {
Ok(tag[6..].parse()?)
// TODO: accept dynamic size.
Ok(tag[4..].parse()?)
} else {
let tag = tag[1..].split('.').collect::<Vec<_>>();
let mut ver = tag[0].parse::<u32>()? * 1_000 + tag[1].parse::<u32>()? * 100;
Expand All @@ -226,7 +227,7 @@ fn tag2spec_version_should_work() {
assert_eq!(tag2spec_version("v1.2.0", false).unwrap(), 1200);
assert_eq!(tag2spec_version("v1.2.3", false).unwrap(), 1230);
assert_eq!(tag2spec_version("v1.2.3-1", false).unwrap(), 1231);
assert_eq!(tag2spec_version("pango-1234", true).unwrap(), 1234);
assert_eq!(tag2spec_version("koi-1234", true).unwrap(), 1234);
}

#[test]
Expand Down
2 changes: 1 addition & 1 deletion whitelist-upgrade-hasher/Cargo.lock

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

2 changes: 1 addition & 1 deletion whitelist-upgrade-hasher/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
edition = "2021"
name = "wuh"
version = "0.8.1"
version = "0.8.2"

[dependencies]
# crates.io
Expand Down

0 comments on commit ba8939d

Please sign in to comment.