Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multiple improvements #46

Merged
merged 2 commits into from
Nov 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 43 additions & 0 deletions .github/workflows/rust-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Rust - Release creation

on:
release:
types: [created]

jobs:
create-release:
runs-on: ubuntu-latest

steps:
- name: "Checkout repository"
uses: actions/checkout@v4

- name: "Set up Rust"
uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true

- name: "Install dependencies"
run: |
sudo apt update
sudo apt install -y rpm
cargo install cargo-deb
cargo install cargo-generate-rpm

- name: "build-release"
run: cargo build --release

- name: "Build DEB package"
run: cargo deb -p adb_cli

- name: "Build RPM package"
run: cargo generate-rpm -p adb_cli

- name: "Publish deb package"
uses: softprops/action-gh-release@v2
with:
files: |
target/debian/*.deb
target/generate-rpm/*.rpm
target/release/adb_cli
6 changes: 4 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,13 @@ members = ["adb_cli", "adb_client"]
resolver = "2"

[workspace.package]
authors = ["Corentin LIAUD"]
edition = "2021"
homepage = "https://github.com/cocool97/adb_client"
keywords = ["adb", "android", "tcp", "usb"]
license = "MIT"
license-file = "LICENSE"
repository = "https://github.com/cocool97/adb_client"
version = "2.0.1"
version = "2.0.2"

# To build locally when working on a new release
[patch.crates-io]
Expand Down
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) [year] [fullname]

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
22 changes: 21 additions & 1 deletion adb_cli/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
[package]
authors.workspace = true
description = "Rust ADB (Android Debug Bridge) CLI"
edition.workspace = true
keywords.workspace = true
license.workspace = true
license-file.workspace = true
name = "adb_cli"
readme = "README.md"
repository.workspace = true
Expand All @@ -17,3 +18,22 @@ log = { version = "0.4.22" }

[target.'cfg(unix)'.dependencies]
termios = { version = "0.3.3" }

#####################################
# Debian package build instructions #
#####################################
[package.metadata.deb]
assets = [
{ source = "target/release/adb_cli", dest = "usr/bin/", mode = "755" },
]
priority = "optional"
section = "utility"

##################################
# RPM package build instructions #
##################################
[package.metadata.generate-rpm]
assets = [
{ source = "target/release/adb_cli", dest = "/usr/bin/adb_cli", mode = "755" },
]
license = "MIT"
3 changes: 2 additions & 1 deletion adb_client/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
[package]
authors.workspace = true
description = "Rust ADB (Android Debug Bridge) client library"
edition.workspace = true
keywords.workspace = true
license.workspace = true
license-file.workspace = true
name = "adb_client"
readme = "README.md"
repository.workspace = true
Expand Down
Loading