Skip to content

Commit

Permalink
fix: not copying to clipboard
Browse files Browse the repository at this point in the history
  • Loading branch information
Tricked-dev committed Apr 15, 2022
1 parent 93da172 commit ec15039
Show file tree
Hide file tree
Showing 7 changed files with 169 additions and 45 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/linux.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ sudo mv appimagetool-x86_64.AppImage /bin/appimagetool
cd desktop

run() {
strip -s target/release/ascella
strip -s target/release/ascella-desktop
echo installing cargo $1
cargo install cargo-$1 &>/dev/null
echo Running cargo $1
Expand All @@ -26,8 +26,8 @@ run generate-rpm
mkdir ../dist &>/dev/null

mv PKGBUILD ../dist/
mv ascella-*.AppImage ../dist/
mv ascella-*.tar.gz ../dist/
mv target/debian/ascella_*.deb ../dist/
mv target/generate-rpm/ascella-*.rpm ../dist/
mv ascella-desktop-*.AppImage ../dist/
mv ascella-desktop-*.tar.gz ../dist/
mv target/debian/ascella-desktop*.deb ../dist/
mv target/generate-rpm/ascella-desktop-*.rpm ../dist/
cp LICENSE ../dist/
19 changes: 5 additions & 14 deletions .github/workflows/release-desktop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:

env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
BIN_NAME: desktop
BIN_NAME: ascella-desktop
PROJECT_NAME: ascella
REPO_NAME: Tricked-dev/ascella

Expand Down Expand Up @@ -66,27 +66,18 @@ jobs:
with:
use-cross: ${{ matrix.cross }}
command: build
args: --release --target ${{ matrix.target }} --bin desktop
args: --release --target ${{ matrix.target }}

- name: Strip release binary (linux and macos)
run: strip "./target/${{ matrix.target }}/release/$BIN_NAME"

# - run: mv ./target .

- name: make dist
run: mkdir dist

- name: Build archive
if: matrix.build == 'x86_64-macos'
shell: bash
run: |
if [ "${{ matrix.os }}" = "windows-2019" ]; then
# cp target/wix/ascella* dist/
cp "target/${{ matrix.target }}/release/$BIN_NAME.exe" "dist/"
else
cp "target/${{ matrix.target }}/release/$BIN_NAME" "dist/"
fi
run: cp "target/${{ matrix.target }}/release/$BIN_NAME" "dist/"
- name: Build stuff
if: matrix.build == 'x86_64-linux'
run: chmod +x ./.github/workflows/linux.sh && ./.github/workflows/linux.sh
Expand Down Expand Up @@ -125,8 +116,8 @@ jobs:
set -ex
mkdir dist
mv ascella-x86_64-linux/* dist/
tar -czvf dist/ascella-x86_64-macos.tar.xz ascella-x86_64-macos
mv ascella-desktop-x86_64-linux/* dist/
tar -czvf dist/ascella-desktop-x86_64-macos.tar.xz ascella-desktop-x86_64-macos
- name: Upload binaries to release
uses: svenstaro/upload-release-action@v2
Expand Down
134 changes: 123 additions & 11 deletions Cargo.lock

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

13 changes: 8 additions & 5 deletions desktop/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,19 +1,21 @@
[package]
name = "ascella"
version = "0.4.4"
name = "ascella-desktop"
version = "0.4.5"
authors = ["Tricked-dev"]
edition = "2021"
homepage = "https://docs.ascella.host/ascella-desktop"
license = "AGPL-3.0"
readme = "README.md"
repository = "https://github.com/Tricked-dev/ascella"
description = "Ascella desktop app uploader"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
chrono = "0.4.19"
clap = { version = "3.0.5", features = ["cargo", "color"] }
clipboard = "0.5.0"
clipboard-ext = "0.2.0"
home = "0.5.3"
iced = { git = "https://github.com/iced-rs/iced", rev = "4db0f4a570a1fb3398062c78770c542d9efb8a64", features = ["tokio", "debug", "glow"] }
itertools = "0.10.3"
Expand All @@ -26,6 +28,7 @@ serde_json = "1.0.74"
tokio = { version = "1.15.0", features = ["sync"] }
toml = "0.5.8"
winit = "0.26.1"
wl-clipboard-rs = "0.6.0"

[target.'cfg(unix)'.dependencies]
openssl = { version = "0.10.38", features = ["vendored"] }
Expand All @@ -35,12 +38,12 @@ libc = "0.2.112"
winapi = "0.3.9"

[[bin]]
name = "desktop"
name = "ascella-desktop"
path = "src/main.rs"

[package.metadata.generate-rpm]
assets = [
{ source = "target/release/desktop", dest = "/usr/bin/ascella", mode = "0755" },
{ source = "target/release/ascella-desktop", dest = "/usr/bin/ascella", mode = "0755" },
{ source = "LICENSE", dest = "/usr/share/doc/ascella/LICENSE", doc = true, mode = "0644" },
{ source = "README.md", dest = "/usr/share/doc/ascella/README.md", doc = true, mode = "0644" },
]
Expand All @@ -54,7 +57,7 @@ depends = "$auto"
section = "utility"
priority = "optional"
assets = [
["target/release/desktop", "usr/bin/", "755"],
["target/release/ascella-desktop", "usr/bin/ascella", "755"],
["LICENSE", "usr/share/doc/ascella/LICENSE", "644"],
["README.md", "usr/share/doc/ascella/README.md", "644"],
]
Loading

0 comments on commit ec15039

Please sign in to comment.