mirror of
https://github.com/veeso/termscp.git
synced 2026-07-26 17:41:02 +02:00
build: add chocolatey package, remove legacy dist build scripts
The old manual dist/build/* scripts and dist/{deb,rpm}.sh are superseded by the
automated release workflow. Add the chocolatey package consumed by release.yml.
This commit is contained in:
25
dist/build/README.md
vendored
25
dist/build/README.md
vendored
@@ -1,25 +0,0 @@
|
|||||||
# Build with Docker
|
|
||||||
|
|
||||||
- [Build with Docker](#build-with-docker)
|
|
||||||
- [Prerequisites](#prerequisites)
|
|
||||||
- [Build](#build)
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## Prerequisites
|
|
||||||
|
|
||||||
- Docker
|
|
||||||
|
|
||||||
## Build
|
|
||||||
|
|
||||||
1. Build x86_64
|
|
||||||
|
|
||||||
this will build termscp for:
|
|
||||||
|
|
||||||
- Linux x86_64 Deb packages
|
|
||||||
- Linux x86_64 RPM packages
|
|
||||||
- Windows x86_64 MSVC packages
|
|
||||||
|
|
||||||
```sh
|
|
||||||
|
|
||||||
```
|
|
||||||
26
dist/build/aarch64_centos7/Dockerfile
vendored
26
dist/build/aarch64_centos7/Dockerfile
vendored
@@ -1,26 +0,0 @@
|
|||||||
FROM centos:centos7 as builder
|
|
||||||
|
|
||||||
WORKDIR /usr/src/
|
|
||||||
# Install dependencies
|
|
||||||
RUN yum -y install \
|
|
||||||
git \
|
|
||||||
gcc \
|
|
||||||
pkgconfig \
|
|
||||||
gcc \
|
|
||||||
make \
|
|
||||||
dbus-devel \
|
|
||||||
libsmbclient-devel \
|
|
||||||
bash \
|
|
||||||
rpm-build
|
|
||||||
# Install rust
|
|
||||||
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs > /tmp/rust.sh && \
|
|
||||||
chmod +x /tmp/rust.sh && \
|
|
||||||
/tmp/rust.sh -y
|
|
||||||
# Clone repository
|
|
||||||
RUN git clone https://github.com/veeso/termscp.git
|
|
||||||
# Set workdir to termscp
|
|
||||||
WORKDIR /usr/src/termscp/
|
|
||||||
# Install cargo rpm
|
|
||||||
RUN source $HOME/.cargo/env && cargo install cargo-rpm
|
|
||||||
|
|
||||||
ENTRYPOINT ["tail", "-f", "/dev/null"]
|
|
||||||
51
dist/build/aarch64_debian10/Dockerfile
vendored
51
dist/build/aarch64_debian10/Dockerfile
vendored
@@ -1,51 +0,0 @@
|
|||||||
FROM debian:buster
|
|
||||||
|
|
||||||
WORKDIR /usr/src/
|
|
||||||
# Install dependencies
|
|
||||||
RUN apt update && apt install -y \
|
|
||||||
git \
|
|
||||||
gcc \
|
|
||||||
pkg-config \
|
|
||||||
libdbus-1-dev \
|
|
||||||
build-essential \
|
|
||||||
libsmbclient-dev \
|
|
||||||
libgit2-dev \
|
|
||||||
build-essential \
|
|
||||||
pkg-config \
|
|
||||||
libbsd-dev \
|
|
||||||
libcap-dev \
|
|
||||||
libcups2-dev \
|
|
||||||
libgnutls28-dev \
|
|
||||||
libicu-dev \
|
|
||||||
libjansson-dev \
|
|
||||||
libkeyutils-dev \
|
|
||||||
libldap2-dev \
|
|
||||||
zlib1g-dev \
|
|
||||||
libpam0g-dev \
|
|
||||||
libacl1-dev \
|
|
||||||
libarchive-dev \
|
|
||||||
flex \
|
|
||||||
bison \
|
|
||||||
libntirpc-dev \
|
|
||||||
libtracker-sparql-3.0-dev \
|
|
||||||
libglib2.0-dev \
|
|
||||||
libdbus-1-dev \
|
|
||||||
libsasl2-dev \
|
|
||||||
libunistring-dev \
|
|
||||||
bash \
|
|
||||||
curl \
|
|
||||||
cpanminus && \
|
|
||||||
cpanm Parse::Yapp::Driver;
|
|
||||||
|
|
||||||
# Install rust
|
|
||||||
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs > /tmp/rust.sh && \
|
|
||||||
chmod +x /tmp/rust.sh && \
|
|
||||||
/tmp/rust.sh -y
|
|
||||||
# Clone repository
|
|
||||||
RUN git clone https://github.com/veeso/termscp.git
|
|
||||||
# Set workdir to termscp
|
|
||||||
WORKDIR /usr/src/termscp/
|
|
||||||
# Install cargo deb
|
|
||||||
RUN . $HOME/.cargo/env && cargo install cargo-deb
|
|
||||||
|
|
||||||
ENTRYPOINT ["tail", "-f", "/dev/null"]
|
|
||||||
52
dist/build/freebsd.sh
vendored
52
dist/build/freebsd.sh
vendored
@@ -1,52 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
|
|
||||||
if [ -z "$1" ]; then
|
|
||||||
echo "Usage: freebsd.sh <version>"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
VERSION=$1
|
|
||||||
|
|
||||||
set -e # Don't fail
|
|
||||||
|
|
||||||
# Go to root dir
|
|
||||||
cd ../../
|
|
||||||
# Check if in correct directory
|
|
||||||
if [ ! -f Cargo.toml ]; then
|
|
||||||
echo "Please start freebsd.sh from dist/build/ directory"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Build release
|
|
||||||
cargo build --release && cargo strip
|
|
||||||
# Make pkg
|
|
||||||
cd target/release/
|
|
||||||
PKG="termscp-v${VERSION}-x86_64-unknown-freebsd.tar.gz"
|
|
||||||
tar czf $PKG termscp
|
|
||||||
sha256sum $PKG
|
|
||||||
# Calc sha256 of exec and copy to path
|
|
||||||
HASH=`sha256sum termscp | cut -d ' ' -f1`
|
|
||||||
sudo cp termscp /usr/local/bin/termscp
|
|
||||||
mkdir -p ../../dist/pkgs/freebsd/
|
|
||||||
mv $PKG ../../dist/pkgs/freebsd/$PKG
|
|
||||||
cd ../../dist/pkgs/freebsd/
|
|
||||||
rm manifest
|
|
||||||
echo -e "name: \"termscp\"" > manifest
|
|
||||||
echo -e "version: $VERSION" >> manifest
|
|
||||||
echo -e "origin: veeso/termscp" >> manifest
|
|
||||||
echo -e "comment: \"A feature rich terminal UI file transfer and explorer with support for SCP/SFTP/FTP/Kube/S3/WebDAV\"" >> manifest
|
|
||||||
echo -e "desc: <<EOD\n\
|
|
||||||
A feature rich terminal UI file transfer and explorer with support for SCP/SFTP/FTP/Kube/S3/WebDAV\n\
|
|
||||||
EOD\n\
|
|
||||||
arch: \"amd64\"\n\
|
|
||||||
www: \"https://termscp.veeso.dev/termscp/\"\n\
|
|
||||||
maintainer: \"christian.visintin1997@gmail.com\"\n\
|
|
||||||
prefix: \"/usr/local/bin\"\n\
|
|
||||||
deps: {\n\
|
|
||||||
}\n\
|
|
||||||
files: {\n\
|
|
||||||
/usr/local/bin/termscp: \"$HASH\"\n\
|
|
||||||
}\n\
|
|
||||||
" >> manifest
|
|
||||||
|
|
||||||
exit $?
|
|
||||||
52
dist/build/linux-aarch64.sh
vendored
52
dist/build/linux-aarch64.sh
vendored
@@ -1,52 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
if [ -z "$1" ]; then
|
|
||||||
echo "Usage: $0 <version> [branch] [--no-cache]"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
VERSION=$1
|
|
||||||
|
|
||||||
if [ -z "$2" ]; then
|
|
||||||
BRANCH=$VERSION
|
|
||||||
else
|
|
||||||
BRANCH=$2
|
|
||||||
fi
|
|
||||||
|
|
||||||
CACHE=""
|
|
||||||
|
|
||||||
if [ "$3" == "--no-cache" ]; then
|
|
||||||
CACHE="--no-cache"
|
|
||||||
fi
|
|
||||||
|
|
||||||
# names
|
|
||||||
ARM64_DEB_NAME="termscp-arm64_deb"
|
|
||||||
|
|
||||||
docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
|
|
||||||
|
|
||||||
set -e # Don't fail
|
|
||||||
|
|
||||||
# Create pkgs directory
|
|
||||||
cd ..
|
|
||||||
PKGS_DIR=$(pwd)/pkgs
|
|
||||||
cd -
|
|
||||||
mkdir -p ${PKGS_DIR}/
|
|
||||||
# Build aarch64_deb
|
|
||||||
cd aarch64_debian10/
|
|
||||||
docker buildx build --platform linux/arm64 $CACHE --build-arg branch=${BRANCH} --tag $ARM64_DEB_NAME .
|
|
||||||
cd -
|
|
||||||
mkdir -p ${PKGS_DIR}/deb/
|
|
||||||
mkdir -p ${PKGS_DIR}/aarch64-unknown-linux-gnu/
|
|
||||||
docker run --name "$ARM64_DEB_NAME" -d "$ARM64_DEB_NAME" || docker start "$ARM64_DEB_NAME"
|
|
||||||
docker exec -it "$ARM64_DEB_NAME" bash -c ". \$HOME/.cargo/env && git fetch origin && git checkout origin/$BRANCH && cargo build --release --features smb-vendored && cargo deb"
|
|
||||||
docker cp ${ARM64_DEB_NAME}:/usr/src/termscp/target/debian/termscp_${VERSION}-1_arm64.deb ${PKGS_DIR}/deb/termscp_${VERSION}_arm64.deb
|
|
||||||
docker cp ${ARM64_DEB_NAME}:/usr/src/termscp/target/release/termscp ${PKGS_DIR}/aarch64-unknown-linux-gnu/
|
|
||||||
docker stop "$ARM64_DEB_NAME"
|
|
||||||
# Make tar.gz
|
|
||||||
cd ${PKGS_DIR}/aarch64-unknown-linux-gnu/
|
|
||||||
tar cvzf termscp-v${VERSION}-aarch64-unknown-linux-gnu.tar.gz termscp
|
|
||||||
echo "Sha256 (homebrew aarch64): $(sha256sum termscp-v${VERSION}-aarch64-unknown-linux-gnu.tar.gz)"
|
|
||||||
rm termscp
|
|
||||||
cd -
|
|
||||||
|
|
||||||
exit $?
|
|
||||||
50
dist/build/linux-x86_64.sh
vendored
50
dist/build/linux-x86_64.sh
vendored
@@ -1,50 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
if [ -z "$1" ]; then
|
|
||||||
echo "Usage: $0 <version> [branch] [--no-cache]"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
VERSION=$1
|
|
||||||
|
|
||||||
if [ -z "$2" ]; then
|
|
||||||
BRANCH=$VERSION
|
|
||||||
else
|
|
||||||
BRANCH=$2
|
|
||||||
fi
|
|
||||||
|
|
||||||
CACHE=""
|
|
||||||
|
|
||||||
if [ "$3" == "--no-cache" ]; then
|
|
||||||
CACHE="--no-cache"
|
|
||||||
fi
|
|
||||||
|
|
||||||
# names
|
|
||||||
X86_64_DEB_NAME="termscp-x86_64_deb"
|
|
||||||
|
|
||||||
set -e # Don't fail
|
|
||||||
|
|
||||||
# Create pkgs directory
|
|
||||||
cd ..
|
|
||||||
PKGS_DIR=$(pwd)/pkgs
|
|
||||||
cd -
|
|
||||||
mkdir -p ${PKGS_DIR}/
|
|
||||||
# Build x86_64_deb
|
|
||||||
cd x86_64_debian12/
|
|
||||||
docker build $CACHE --build-arg branch=${BRANCH} --tag "$X86_64_DEB_NAME" .
|
|
||||||
cd -
|
|
||||||
mkdir -p ${PKGS_DIR}/deb/
|
|
||||||
mkdir -p ${PKGS_DIR}/x86_64-unknown-linux-gnu/
|
|
||||||
docker run --name "$X86_64_DEB_NAME" -d "$X86_64_DEB_NAME" || docker start "$X86_64_DEB_NAME"
|
|
||||||
docker exec -it "$X86_64_DEB_NAME" bash -c ". \$HOME/.cargo/env && git fetch origin && git checkout origin/$BRANCH && cargo build --release --features smb-vendored && cargo deb"
|
|
||||||
docker cp ${X86_64_DEB_NAME}:/usr/src/termscp/target/debian/termscp_${VERSION}-1_amd64.deb ${PKGS_DIR}/deb/termscp_${VERSION}_amd64.deb
|
|
||||||
docker cp ${X86_64_DEB_NAME}:/usr/src/termscp/target/release/termscp ${PKGS_DIR}/x86_64-unknown-linux-gnu/
|
|
||||||
docker stop "$X86_64_DEB_NAME"
|
|
||||||
# Make tar.gz
|
|
||||||
cd ${PKGS_DIR}/x86_64-unknown-linux-gnu/
|
|
||||||
tar cvzf termscp-v${VERSION}-x86_64-unknown-linux-gnu.tar.gz termscp
|
|
||||||
echo "Sha256 x86_64 (homebrew): $(sha256sum termscp-v${VERSION}-x86_64-unknown-linux-gnu.tar.gz)"
|
|
||||||
rm termscp
|
|
||||||
cd -
|
|
||||||
|
|
||||||
exit $?
|
|
||||||
110
dist/build/macos.sh
vendored
110
dist/build/macos.sh
vendored
@@ -1,110 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
|
|
||||||
make_pkg() {
|
|
||||||
ARCH=$1
|
|
||||||
VERSION=$2
|
|
||||||
TARGET_DIR="$3"
|
|
||||||
if [ -z "$TARGET_DIR" ]; then
|
|
||||||
TARGET_DIR=target/release/
|
|
||||||
fi
|
|
||||||
ROOT_DIR=$(pwd)
|
|
||||||
cd "$TARGET_DIR"
|
|
||||||
PKG="termscp-v${VERSION}-${ARCH}-apple-darwin.tar.gz"
|
|
||||||
tar czf "$PKG" termscp
|
|
||||||
HASH=$(sha256sum "$PKG")
|
|
||||||
mkdir -p "${ROOT_DIR}/dist/pkgs/macos/"
|
|
||||||
mv "$PKG" "${ROOT_DIR}/dist/pkgs/macos/$PKG"
|
|
||||||
cd -
|
|
||||||
echo "$HASH"
|
|
||||||
}
|
|
||||||
|
|
||||||
detect_platform() {
|
|
||||||
local platform
|
|
||||||
platform="$(uname -s | tr '[:upper:]' '[:lower:]')"
|
|
||||||
|
|
||||||
case "${platform}" in
|
|
||||||
linux) platform="linux" ;;
|
|
||||||
darwin) platform="macos" ;;
|
|
||||||
freebsd) platform="freebsd" ;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
printf '%s' "${platform}"
|
|
||||||
}
|
|
||||||
|
|
||||||
detect_arch() {
|
|
||||||
local arch
|
|
||||||
arch="$(uname -m | tr '[:upper:]' '[:lower:]')"
|
|
||||||
|
|
||||||
case "${arch}" in
|
|
||||||
amd64) arch="x86_64" ;;
|
|
||||||
armv*) arch="arm" ;;
|
|
||||||
arm64) arch="aarch64" ;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
# `uname -m` in some cases mis-reports 32-bit OS as 64-bit, so double check
|
|
||||||
if [ "${arch}" = "x86_64" ] && [ "$(getconf LONG_BIT)" -eq 32 ]; then
|
|
||||||
arch="i686"
|
|
||||||
elif [ "${arch}" = "aarch64" ] && [ "$(getconf LONG_BIT)" -eq 32 ]; then
|
|
||||||
arch="arm"
|
|
||||||
fi
|
|
||||||
|
|
||||||
printf '%s' "${arch}"
|
|
||||||
}
|
|
||||||
|
|
||||||
if [ -z "$1" ]; then
|
|
||||||
echo "Usage: macos.sh <version>"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
PLATFORM="$(detect_platform)"
|
|
||||||
ARCH="$(detect_arch)"
|
|
||||||
|
|
||||||
if [ "$PLATFORM" != "macos" ]; then
|
|
||||||
echo "macos build is only available on MacOs systems"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
VERSION=$1
|
|
||||||
export BUILD_ROOT
|
|
||||||
BUILD_ROOT="$(pwd)/../../"
|
|
||||||
|
|
||||||
set -e # Don't fail
|
|
||||||
|
|
||||||
# Go to root dir
|
|
||||||
cd ../../
|
|
||||||
# Check if in correct directory
|
|
||||||
if [ ! -f Cargo.toml ]; then
|
|
||||||
echo "Please start macos.sh from dist/build/ directory"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Build release (x86_64)
|
|
||||||
X86_TARGET=""
|
|
||||||
X86_TARGET_DIR=""
|
|
||||||
if [ "$ARCH" = "x86_64" ]; then
|
|
||||||
X86_TARGET="--target x86_64-apple-darwin"
|
|
||||||
X86_TARGET_DIR="target/x86_64-apple-darwin/release/"
|
|
||||||
fi
|
|
||||||
cargo build --release $X86_TARGET
|
|
||||||
# Make pkg
|
|
||||||
X86_64_HASH=$(make_pkg "x86_64" "$VERSION" $X86_TARGET_DIR)
|
|
||||||
RET_X86_64=$?
|
|
||||||
|
|
||||||
ARM64_TARGET=""
|
|
||||||
ARM64_TARGET_DIR=""
|
|
||||||
if [ "$ARCH" = "aarch64" ] || [ "$ARCH" = "arm64" ]; then
|
|
||||||
ARM64_TARGET="--target aarch64-apple-darwin"
|
|
||||||
ARM64_TARGET_DIR="target/aarch64-apple-darwin/release/"
|
|
||||||
fi
|
|
||||||
cd "$BUILD_ROOT"
|
|
||||||
# Build ARM64 pkg
|
|
||||||
cargo build --release $ARM64_TARGET
|
|
||||||
# Make pkg
|
|
||||||
ARM64_HASH=$(make_pkg "arm64" "$VERSION" $ARM64_TARGET_DIR)
|
|
||||||
RET_ARM64=$?
|
|
||||||
|
|
||||||
echo "x86_64 hash: $X86_64_HASH"
|
|
||||||
echo "arm64 hash: $ARM64_HASH"
|
|
||||||
|
|
||||||
[ "$RET_ARM64" -eq 0 ] && [ "$RET_X86_64" -eq 0 ]
|
|
||||||
exit $?
|
|
||||||
20
dist/build/windows.ps1
vendored
20
dist/build/windows.ps1
vendored
@@ -1,20 +0,0 @@
|
|||||||
$ErrorActionPreference = 'Stop';
|
|
||||||
|
|
||||||
if ($args.Count -eq 0) {
|
|
||||||
Write-Output "Usage: windows.ps1 <version>"
|
|
||||||
exit 1
|
|
||||||
}
|
|
||||||
|
|
||||||
$version = $args[0]
|
|
||||||
|
|
||||||
# Go to root directory
|
|
||||||
Set-Location ..\..\
|
|
||||||
# Build
|
|
||||||
cargo build --release
|
|
||||||
# Make zip
|
|
||||||
$zipName = "termscp-v$version-x86_64-pc-windows-msvc.zip"
|
|
||||||
Set-Location .\target\release\
|
|
||||||
Compress-Archive -Force termscp.exe $zipName
|
|
||||||
# Get checksum
|
|
||||||
Get-FileHash $zipName
|
|
||||||
Move-Item $zipName .\..\..\dist\pkgs\windows\$zipName
|
|
||||||
26
dist/build/x86_64_centos7/Dockerfile
vendored
26
dist/build/x86_64_centos7/Dockerfile
vendored
@@ -1,26 +0,0 @@
|
|||||||
FROM centos:centos7 as builder
|
|
||||||
|
|
||||||
WORKDIR /usr/src/
|
|
||||||
# Install dependencies
|
|
||||||
RUN yum -y install \
|
|
||||||
git \
|
|
||||||
gcc \
|
|
||||||
pkgconfig \
|
|
||||||
gcc \
|
|
||||||
make \
|
|
||||||
dbus-devel \
|
|
||||||
libsmbclient-devel \
|
|
||||||
bash \
|
|
||||||
rpm-build
|
|
||||||
# Install rust
|
|
||||||
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs > /tmp/rust.sh && \
|
|
||||||
chmod +x /tmp/rust.sh && \
|
|
||||||
/tmp/rust.sh -y
|
|
||||||
# Clone repository
|
|
||||||
RUN git clone https://github.com/veeso/termscp.git
|
|
||||||
# Set workdir to termscp
|
|
||||||
WORKDIR /usr/src/termscp/
|
|
||||||
# Install cargo rpm
|
|
||||||
RUN source $HOME/.cargo/env && cargo install cargo-rpm
|
|
||||||
|
|
||||||
ENTRYPOINT ["tail", "-f", "/dev/null"]
|
|
||||||
54
dist/build/x86_64_debian12/Dockerfile
vendored
54
dist/build/x86_64_debian12/Dockerfile
vendored
@@ -1,54 +0,0 @@
|
|||||||
FROM debian:bookworm
|
|
||||||
|
|
||||||
WORKDIR /usr/src/
|
|
||||||
# Install dependencies
|
|
||||||
RUN apt update && apt install -y \
|
|
||||||
git \
|
|
||||||
gcc \
|
|
||||||
pkg-config \
|
|
||||||
libdbus-1-dev \
|
|
||||||
build-essential \
|
|
||||||
libsmbclient-dev \
|
|
||||||
libgit2-dev \
|
|
||||||
build-essential \
|
|
||||||
pkg-config \
|
|
||||||
libbsd-dev \
|
|
||||||
libcap-dev \
|
|
||||||
libcups2-dev \
|
|
||||||
libgnutls28-dev \
|
|
||||||
libgnutls30 \
|
|
||||||
libicu-dev \
|
|
||||||
libjansson-dev \
|
|
||||||
libkeyutils-dev \
|
|
||||||
libldap2-dev \
|
|
||||||
zlib1g-dev \
|
|
||||||
libpam0g-dev \
|
|
||||||
libacl1-dev \
|
|
||||||
libarchive-dev \
|
|
||||||
libssl-dev \
|
|
||||||
flex \
|
|
||||||
bison \
|
|
||||||
libntirpc-dev \
|
|
||||||
libglib2.0-dev \
|
|
||||||
libdbus-1-dev \
|
|
||||||
libsasl2-dev \
|
|
||||||
libunistring-dev \
|
|
||||||
bash \
|
|
||||||
curl \
|
|
||||||
cpanminus && \
|
|
||||||
cpanm Parse::Yapp::Driver;
|
|
||||||
|
|
||||||
# Install rust
|
|
||||||
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs > /tmp/rust.sh && \
|
|
||||||
chmod +x /tmp/rust.sh && \
|
|
||||||
/tmp/rust.sh -y && \
|
|
||||||
. $HOME/.cargo/env && \
|
|
||||||
cargo version
|
|
||||||
# Clone repository
|
|
||||||
RUN git clone https://github.com/veeso/termscp.git
|
|
||||||
# Set workdir to termscp
|
|
||||||
WORKDIR /usr/src/termscp/
|
|
||||||
# Install cargo deb
|
|
||||||
RUN . $HOME/.cargo/env && cargo install cargo-deb
|
|
||||||
|
|
||||||
ENTRYPOINT ["tail", "-f", "/dev/null"]
|
|
||||||
8
dist/chocolatey/README.md
vendored
Normal file
8
dist/chocolatey/README.md
vendored
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
# Chocolatey How To
|
||||||
|
|
||||||
|
Just:
|
||||||
|
|
||||||
|
1. Calculate the SHA256 checksum for the latest release of ZIP files both for aarch64 and x86_64 versions.
|
||||||
|
2. Update checksums in `tools/chocolateyinstall.ps1`
|
||||||
|
3. run `choco pack`
|
||||||
|
4. run `choco push termscp.$VERSION.nupkg --source https://push.chocolatey.org/`
|
||||||
58
dist/chocolatey/termscp.nuspec
vendored
Normal file
58
dist/chocolatey/termscp.nuspec
vendored
Normal file
@@ -0,0 +1,58 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
|
||||||
|
<package xmlns="http://schemas.microsoft.com/packaging/2015/06/nuspec.xsd">
|
||||||
|
<metadata>
|
||||||
|
<id>termscp</id>
|
||||||
|
<version>1.0.0</version>
|
||||||
|
<title>termSCP</title>
|
||||||
|
<authors>Christian Visintin</authors>
|
||||||
|
<owners>Christian Visintin</owners>
|
||||||
|
<projectUrl>https://veeso.github.io/termscp/</projectUrl>
|
||||||
|
<copyright>Christian Visintin (C) 2024</copyright>
|
||||||
|
<licenseUrl>https://github.com/veeso/TermSCP/blob/main/LICENSE</licenseUrl>
|
||||||
|
<iconUrl>https://rawcdn.githack.com/veeso/termscp/c3e5663cf45c4d6a7b50c8b15f89683a2e01b829/assets/images/termscp-512.png</iconUrl>
|
||||||
|
<requireLicenseAcceptance>true</requireLicenseAcceptance>
|
||||||
|
<projectSourceUrl>https://github.com/veeso/termscp/tree/main/src</projectSourceUrl>
|
||||||
|
<packageSourceUrl>https://github.com/veeso/termscp</packageSourceUrl>
|
||||||
|
<releaseNotes>https://github.com/veeso/termscp/blob/main/CHANGELOG.md</releaseNotes>
|
||||||
|
<docsUrl>https://docs.rs/termscp</docsUrl>
|
||||||
|
<bugTrackerUrl>https://github.com/veeso/termscp/issues</bugTrackerUrl>
|
||||||
|
<tags>termscp winscp rust rust-lang rust-crate scp ssh-client ssh sftp-client ftp-client ftps utility terminal-app terminal command-line-utility command-line-tool tui-rs winscp sftp</tags>
|
||||||
|
<summary>A feature rich terminal UI file transfer and explorer with support for SCP/SFTP/FTP/Kube/WebDAV/S3</summary>
|
||||||
|
<description>
|
||||||
|
## About TermSCP
|
||||||
|
|
||||||
|
Termscp is a feature rich terminal file transfer and explorer, with support for SCP/SFTP/FTP/S3. So basically is a terminal utility with an TUI to connect to a remote server to retrieve and upload files and to interact with the local file system. It is **Linux**, **MacOS**, **BSD** and **Windows** compatible and supports SFTP, SCP, FTP and FTPS.
|
||||||
|
|
||||||
|
Features:
|
||||||
|
|
||||||
|
- 📁 Different communication protocols
|
||||||
|
- SFTP
|
||||||
|
- Kube
|
||||||
|
- WebDAV
|
||||||
|
- SCP
|
||||||
|
- FTP and FTPS
|
||||||
|
- S3
|
||||||
|
- SMB
|
||||||
|
- 🖥 Explore and operate on the remote and on the local machine file system with a handy UI
|
||||||
|
- Create, remove, rename, search, view and edit files
|
||||||
|
- ⭐ Connect to your favourite hosts through built-in bookmarks and recent connections
|
||||||
|
- 📝 View and edit text files with your favourite text editor
|
||||||
|
- 💁 SFTP/SCP authentication through SSH keys and username/password
|
||||||
|
- 🐧 Compatible with Windows, Linux, BSD and MacOS
|
||||||
|
- ✏ Customizable
|
||||||
|
- Themes
|
||||||
|
- Custom file explorer format
|
||||||
|
- Customizable text editor
|
||||||
|
- Customizable file sorting
|
||||||
|
- 🔐 Save your password in your operating system key vault
|
||||||
|
- 🦀 Rust-powered
|
||||||
|
- 🤝 Easy to extend with new file transfers protocols
|
||||||
|
- 👀 Developed keeping an eye on performance
|
||||||
|
- 🦄 Frequent awesome updates
|
||||||
|
</description>
|
||||||
|
</metadata>
|
||||||
|
<files>
|
||||||
|
<file src="tools\**" target="tools" />
|
||||||
|
</files>
|
||||||
|
</package>
|
||||||
25
dist/chocolatey/tools/chocolateyinstall.ps1
vendored
Normal file
25
dist/chocolatey/tools/chocolateyinstall.ps1
vendored
Normal file
@@ -0,0 +1,25 @@
|
|||||||
|
$ErrorActionPreference = 'Stop';
|
||||||
|
$toolsDir = "$(Split-Path -parent $MyInvocation.MyCommand.Definition)"
|
||||||
|
|
||||||
|
# Detect arch: PROCESSOR_ARCHITECTURE is "ARM64" on ARM, "AMD64" on x64
|
||||||
|
$is_arm64 = $env:PROCESSOR_ARCHITECTURE -eq 'ARM64' -or $env:PROCESSOR_ARCHITEW6432 -eq 'ARM64'
|
||||||
|
|
||||||
|
if ($is_arm64) {
|
||||||
|
$url = 'https://github.com/veeso/termscp/releases/download/v1.0.0/termscp-v1.0.0-msvc.zip'
|
||||||
|
$checksum = 'f6ad6c62f1578562f9af4bcee93bd4cc429cb52219c3636359b008db8789587e'
|
||||||
|
} else {
|
||||||
|
$url = 'https://github.com/veeso/termscp/releases/download/v1.0.0/termscp-v1.0.0-x86_64-pc-windows-msvc.zip'
|
||||||
|
$checksum = 'd7796081b6f67b82acfa94557aa6852d12a33daab3cca6490660b20e42752005'
|
||||||
|
}
|
||||||
|
|
||||||
|
$packageArgs = @{
|
||||||
|
packageName = $env:ChocolateyPackageName
|
||||||
|
fileType = 'EXE'
|
||||||
|
url = $url
|
||||||
|
unzipLocation = $toolsDir
|
||||||
|
softwareName = 'termscp*'
|
||||||
|
checksum = $checksum
|
||||||
|
checksumType = 'sha256'
|
||||||
|
validExitCodes = @(0, 3010, 1641)
|
||||||
|
}
|
||||||
|
Install-ChocolateyZipPackage @packageArgs
|
||||||
11
dist/deb.sh
vendored
11
dist/deb.sh
vendored
@@ -1,11 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
echo "Installing cargo-deb..."
|
|
||||||
cargo install cargo-deb
|
|
||||||
if [ ! -f "Cargo.toml" ]; then
|
|
||||||
echo "Yout must be in the project root directory"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
echo "Running cargo-deb"
|
|
||||||
cargo deb
|
|
||||||
exit $?
|
|
||||||
16
dist/rpm.sh
vendored
16
dist/rpm.sh
vendored
@@ -1,16 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
which rpmbuild > /dev/null
|
|
||||||
if [ $? -ne 0 ]; then
|
|
||||||
echo "You must install rpmbuild on your machine"
|
|
||||||
fi
|
|
||||||
echo "Installing cargo-rpm..."
|
|
||||||
cargo install cargo-rpm
|
|
||||||
if [ ! -f "Cargo.toml" ]; then
|
|
||||||
echo "Yout must be in the project root directory"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
echo "Running cargo-rpm"
|
|
||||||
cargo rpm init
|
|
||||||
cargo rpm build
|
|
||||||
exit $?
|
|
||||||
Reference in New Issue
Block a user