Skip to content

Commit

Permalink
bug fix and cargo
Browse files Browse the repository at this point in the history
  • Loading branch information
cycle-five committed Aug 25, 2024
1 parent a48d0b4 commit bc3cf26
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 13 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ on:
jobs:
# Run 'cargo dist plan' (or host) to determine what tasks we need to do
plan:
runs-on: "ubuntu-20.04"
runs-on: "ubuntu-latest"
outputs:
val: ${{ steps.plan.outputs.manifest }}
tag: ${{ !github.event.pull_request && github.ref_name || '' }}
Expand Down Expand Up @@ -158,7 +158,7 @@ jobs:
needs:
- plan
- build-local-artifacts
runs-on: "ubuntu-20.04"
runs-on: "ubuntu-latest"
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
BUILD_MANIFEST_NAME: target/distrib/global-dist-manifest.json
Expand Down Expand Up @@ -208,7 +208,7 @@ jobs:
if: ${{ always() && needs.plan.outputs.publishing == 'true' && (needs.build-global-artifacts.result == 'skipped' || needs.build-global-artifacts.result == 'success') && (needs.build-local-artifacts.result == 'skipped' || needs.build-local-artifacts.result == 'success') }}
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
runs-on: "ubuntu-20.04"
runs-on: "ubuntu-latest"
outputs:
val: ${{ steps.host.outputs.manifest }}
steps:
Expand Down Expand Up @@ -272,7 +272,7 @@ jobs:
# still allowing individual publish jobs to skip themselves (for prereleases).
# "host" however must run to completion, no skipping allowed!
if: ${{ always() && needs.host.result == 'success' }}
runs-on: "ubuntu-20.04"
runs-on: "ubuntu-latest"
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
Expand Down
1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ resolver = "2"
edition = "2021"
license = "MIT"
authors = ["Cycle Five <[email protected]>"]
allow-dirty = true

[workspace.dependencies.sqlx]
version = "0.7.4"
Expand Down
8 changes: 1 addition & 7 deletions crack-core/src/messaging/interface.rs
Original file line number Diff line number Diff line change
Expand Up @@ -290,18 +290,12 @@ pub fn build_now_playing_embed_metadata(
.footer(CreateEmbedFooter::new(footer_text).icon_url(footer_icon_url))
}

// pub async fn track_handle_to_metadata(
// track: &TrackHandle,
// ) -> Result<(Option<UserId>, Option<Duration>, MyAuxMetadata), CrackedError> {
// Ok((requesting_user, duration, MyAuxMetadata(metadata)))
// }

/// Creates a now playing embed for the given track.
pub async fn create_now_playing_embed(track: &TrackHandle) -> CreateEmbed {
// let (requesting_user, duration, metadata) = track_handle_to_metadata(track).await.unwrap();
let metadata = get_track_handle_metadata(track).await;
let requesting_user = get_requesting_user(track).await.ok();
let duration = Some(track.get_info().await.unwrap().position);
let duration = Some(track.get_info().await.unwrap_or_default().position);
build_now_playing_embed_metadata(requesting_user, duration, MyAuxMetadata(metadata))
}

Expand Down
5 changes: 3 additions & 2 deletions dist-workspace.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ members = ["cargo:crack-cli"]

# Config for 'cargo dist'
[dist]
allow-dirty = ["ci"]
# The preferred cargo-dist version to use in CI (Cargo.toml SemVer syntax)
cargo-dist-version = "0.21.0"
# CI backends to support
Expand All @@ -19,9 +20,9 @@ install-updater = false
hosting = "github"
custom-success-message = "Be of Mæth and malinger not with Commies!"
# Run on latest ubuntu
[package.metadata.dist.github-custom-runners]
[dist.github-custom-runners]
x86_64-unknown-linux-gnu = "ubuntu-latest"

[[package.metadata.dist.extra-artifacts]]
[[dist.extra-artifacts]]
artifacts = ["data.tar"]
build = ["tar", "-cf", "data.tar", "data"]

0 comments on commit bc3cf26

Please sign in to comment.