Skip to content
This repository has been archived by the owner on Dec 12, 2024. It is now read-only.

Commit

Permalink
deactivate gh actions
Browse files Browse the repository at this point in the history
spellcheck en.
  • Loading branch information
TOwInOK committed Mar 3, 2024
1 parent e4f2142 commit 6e27464
Show file tree
Hide file tree
Showing 7 changed files with 47 additions and 41 deletions.
34 changes: 17 additions & 17 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
name: Rust
# name: Rust

on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
# on:
# push:
# branches: [ "master" ]
# pull_request:
# branches: [ "master" ]

env:
CARGO_TERM_COLOR: always
# env:
# CARGO_TERM_COLOR: always

jobs:
build:
# jobs:
# build:

runs-on: ubuntu-latest
# runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- name: Билдим крейт
run: cargo build --verbose
# - name: Run tests
# run: cargo test --verbose
# steps:
# - uses: actions/checkout@v3
# - name: Билдим крейт
# run: cargo build --verbose
# # - name: Run tests
# # run: cargo test --verbose
9 changes: 8 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
{
"rust-analyzer.showUnlinkedFileNotification": false
"rust-analyzer.showUnlinkedFileNotification": false,
"cSpell.words": [
"Datapack",
"Datapacks",
"modrinth",
"Purpur",
"tempfile"
]
}
2 changes: 1 addition & 1 deletion src/config/errors.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ use thiserror::Error;
#[derive(Error, Debug)]
pub enum DownloadErrors {
#[error("Загрузка прекращенна потому что: {0}")]
DownloadCorrapt(String),
DownloadCorrupt(String),
}

#[derive(Error, Debug)]
Expand Down
37 changes: 18 additions & 19 deletions src/config/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,9 @@ mod version;
use datapack::*;
use errors::*;
use log::{error, info};
use models::{vanila::Vanilla, *};
use models::{vanilla::Vanilla, *};
use plugin::Plugin;
use serde::{Deserialize, Serialize};
use tempfile::Builder;
use tokio::fs;
use version::Versions;

Expand Down Expand Up @@ -85,50 +84,50 @@ impl Config {
async fn download_core(self) -> Result<Option<()>, DownloadErrors> {
match self.version {
//Download purpur
Versions::Purpur(ver, freez) => {
if freez {
Versions::Purpur(ver, freeze) => {
if freeze {
//We don't need to download
return Ok(None);
}
//use if error
Err(DownloadErrors::DownloadCorrapt("ff".to_string()))
Err(DownloadErrors::DownloadCorrupt("ff".to_string()))
}
//Download paper
Versions::Paper(ver, freez) => {
if freez {
Versions::Paper(ver, feeze) => {
if feeze {
//We don't need to download
return Ok(None);
}
//use if error
Err(DownloadErrors::DownloadCorrapt("ff".to_string()))
Err(DownloadErrors::DownloadCorrupt("ff".to_string()))
}
//Download Spigot
Versions::Spigot(ver, freez) => {
if freez {
Versions::Spigot(ver, freeze) => {
if freeze {
//We don't need to download
return Ok(None);
}
//use if error
Err(DownloadErrors::DownloadCorrapt("ff".to_string()))
Err(DownloadErrors::DownloadCorrupt("ff".to_string()))
}
//Download Bucket
Versions::Bucket(ver, freez) => {
if freez {
Versions::Bucket(ver, freeze) => {
if freeze {
//We don't need to download
return Ok(None);
}
//use if error
Err(DownloadErrors::DownloadCorrapt("ff".to_string()))
Err(DownloadErrors::DownloadCorrupt("ff".to_string()))
}
//Download Vanila
Versions::Vanila(ver, freez) => {
if freez {
//Download Vanilla
Versions::Vanilla(ver, freeze) => {
if freeze {
//We don't need to download
return Ok(None);
}
//use if error
// Err(DownloadErrors::DownloadCorrapt("ff".to_string()))
// let tmp_dir = Builder::new().tempdir().map_err(|er| ConfigErrors::LoadCorrapt(er.to_string()));
// Err(DownloadErrors::DownloadCorrupt("ff".to_string()))
// let tmp_dir = Builder::new().temp().map_err(|er| ConfigErrors::LoadCorrupt(er.to_string()));
let _ = match Vanilla::find(&*ver).await {
Ok(_) => {}
Err(e) => {
Expand Down
2 changes: 1 addition & 1 deletion src/config/models/mod.rs
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
pub mod item;
pub mod vanila;
pub mod vanilla;
File renamed without changes.
4 changes: 2 additions & 2 deletions src/config/version.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@ pub enum Versions {
Paper(String, bool),
Spigot(String, bool),
Bucket(String, bool),
Vanila(String, bool),
Vanilla(String, bool),
}

impl Default for Versions {
fn default() -> Self {
Versions::Vanila("latest".to_string(), false)
Versions::Vanilla("latest".to_string(), false)
}
}

0 comments on commit 6e27464

Please sign in to comment.