A .builds/beta.yml => .builds/beta.yml +15 -0
@@ 0,0 1,15 @@
+image: archlinux
+package:
+ - curl
+sources:
+ - https://git.sr.ht/~janbaudisch/photoprintit-tools
+tasks:
+ - setup: curl -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain beta
+ - build: |
+ . $HOME/.cargo/env
+ cd photoprintit-tools
+ cargo build --verbose --all
+ - test: |
+ . $HOME/.cargo/env
+ cd photoprintit-tools
+ cargo test --verbose --all
A .builds/lint.yml => .builds/lint.yml +19 -0
@@ 0,0 1,19 @@
+image: archlinux
+package:
+ - curl
+sources:
+ - https://git.sr.ht/~janbaudisch/photoprintit-tools
+tasks:
+ - setup: |
+ curl -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain stable
+ . $HOME/.cargo/env
+ rustup component add rustfmt
+ rustup component add clippy
+ - format: |
+ . $HOME/.cargo/env
+ cd photoprintit-tools
+ cargo fmt --all -- --check
+ - lint: |
+ . $HOME/.cargo/env
+ cd photoprintit-tools
+ cargo clippy --all -- --deny clippy::all
A .builds/nightly.yml => .builds/nightly.yml +15 -0
@@ 0,0 1,15 @@
+image: archlinux
+package:
+ - curl
+sources:
+ - https://git.sr.ht/~janbaudisch/photoprintit-tools
+tasks:
+ - setup: curl -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain nightly
+ - build: |
+ . $HOME/.cargo/env
+ cd photoprintit-tools
+ cargo build --verbose --all
+ - test: |
+ . $HOME/.cargo/env
+ cd photoprintit-tools
+ cargo test --verbose --all
A .builds/stable.yml => .builds/stable.yml +15 -0
@@ 0,0 1,15 @@
+image: archlinux
+package:
+ - curl
+sources:
+ - https://git.sr.ht/~janbaudisch/photoprintit-tools
+tasks:
+ - setup: curl -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain stable
+ - build: |
+ . $HOME/.cargo/env
+ cd photoprintit-tools
+ cargo build --verbose --all
+ - test: |
+ . $HOME/.cargo/env
+ cd photoprintit-tools
+ cargo test --verbose --all
D .rustfmt.toml => .rustfmt.toml +0 -1
@@ 1,1 0,0 @@
-trailing_comma = "Never"
D .travis.yml => .travis.yml +0 -52
@@ 1,52 0,0 @@
-language: rust
-
-branches:
- except:
- - /^dependabot\/.*/
-
-rust:
- - stable
- - beta
- - nightly
-
-script:
- - cargo build
-
-jobs:
- include:
- - stage: lint
- rust: stable
- cache: cargo
- install:
- - rustup component add clippy
- script:
- - cargo clippy --all -- --deny clippy::all
-
- - stage: format
- rust: nightly
- install:
- - rustup component add rustfmt || cargo install --git https://github.com/rust-lang/rustfmt --force --bin rustfmt
- script:
- - cargo fmt --all -- --check
-
- - stage: deploy
- branches:
- only:
- - master
- if: tag IS present AND fork = false
- rust: stable
- script:
- - set -e
- - cargo build --release
- - mv target/release/photoprintit-tools target/release/photoprintit-tools-x86_64-unknown-linux-gnu
- - strip -s target/release/photoprintit-tools-x86_64-unknown-linux-gnu
- - cargo login $CRATES_IO_TOKEN
- - cargo package
- - cargo publish
- deploy: &releases
- provider: releases
- api_key: $GITHUB_TOKEN
- file: "target/release/photoprintit-tools-x86_64-unknown-linux-gnu"
- skip_cleanup: true
- on:
- tags: true
M Cargo.toml => Cargo.toml +1 -1
@@ 3,7 3,7 @@ name = "photoprintit-tools"
description = "A collection of tools for photoprintit software."
version = "0.1.0"
authors = ["Jan Baudisch <dev@baudisch.xyz>"]
-repository = "https://github.com/janbaudisch/photoprintit-tools.git"
+repository = "https://git.sr.ht/~janbaudisch/photoprintit-tools"
readme = "README.md"
keywords = ["photoprintit", "cli", "tool"]
categories = ["command-line-utilities"]
M README.md => README.md +3 -3
@@ 2,7 2,7 @@
# photoprintit-tools
-> A collection of tools for photoprintit software
+> A collection of tools for photoprintit software.
## Installation
@@ 38,7 38,7 @@ OPTIONS:
MIT licensed, see [`LICENSE`](LICENSE)
-[build-img]: https://travis-ci.com/janbaudisch/photoprintit-tools.svg?branch=master
-[build-url]: https://travis-ci.com/janbaudisch/photoprintit-tools
+[build-img]: https://builds.sr.ht/~janbaudisch/photoprintit-tools.svg
+[build-url]: https://builds.sr.ht/~janbaudisch/photoprintit-tools
[crates-io-img]: https://img.shields.io/crates/v/photoprintit-tools.svg
[crates-io-url]: https://crates.io/crates/photoprintit-tools
M src/cli.rs => src/cli.rs +2 -2
@@ 6,7 6,7 @@ use super::Platform;
pub enum Cli {
/// Prepare download
#[structopt(name = "prepare")]
- Prepare(Prepare)
+ Prepare(Prepare),
}
/// Prepare download
@@ 36,5 36,5 @@ pub struct Prepare {
long = "download-server",
default_value = "https://dls.photoprintit.com"
)]
- pub dl_server: String
+ pub dl_server: String,
}
M src/main.rs => src/main.rs +1 -1
@@ 18,6 18,6 @@ use structopt::StructOpt;
fn main() {
pretty_env_logger::init();
match Cli::from_args() {
- Cli::Prepare(args) => prepare::main(&args)
+ Cli::Prepare(args) => prepare::main(&args),
}
}
M src/platform.rs => src/platform.rs +2 -2
@@ 5,7 5,7 @@ pub enum Platform {
Linux64,
Mac,
Windows,
- Windows64
+ Windows64,
}
impl<'a> From<&'a str> for Platform {
@@ 18,7 18,7 @@ impl<'a> From<&'a str> for Platform {
"m" => Platform::Mac,
"w" => Platform::Windows,
"w64" => Platform::Windows64,
- _ => panic!("Unknown platform: {}", input)
+ _ => panic!("Unknown platform: {}", input),
}
}
}
M src/prepare/parser.rs => src/prepare/parser.rs +1 -1
@@ 5,7 5,7 @@ use std::str::FromStr;
#[derive(Debug)]
pub struct File {
pub url: String,
- pub platform: Platform
+ pub platform: Platform,
}
impl fmt::Display for File {