mirror of
https://github.com/nestriness/cdc-file-transfer.git
synced 2026-01-30 10:35:37 +02:00
[Release] Include docs and cdc_rsync_server.exe in zip (#70)
Also clarifies some unclear aspects in the readme, and adds a fix that allows create_release.yml to be used for pull requests for testing. Fixes #67 Fixes #55
This commit is contained in:
8
.github/workflows/create_release.yml
vendored
8
.github/workflows/create_release.yml
vendored
@@ -98,10 +98,13 @@ jobs:
|
|||||||
- name: Copy artifacts
|
- name: Copy artifacts
|
||||||
run: |
|
run: |
|
||||||
mkdir artifacts
|
mkdir artifacts
|
||||||
|
mkdir artifacts\docs
|
||||||
cp bazel-bin/cdc_rsync/cdc_rsync.exe artifacts
|
cp bazel-bin/cdc_rsync/cdc_rsync.exe artifacts
|
||||||
|
cp bazel-bin/cdc_rsync_server/cdc_rsync_server.exe artifacts
|
||||||
cp bazel-bin/cdc_stream/cdc_stream.exe artifacts
|
cp bazel-bin/cdc_stream/cdc_stream.exe artifacts
|
||||||
cp LICENSE artifacts
|
cp LICENSE artifacts
|
||||||
cp README.md artifacts
|
cp README.md artifacts
|
||||||
|
cp docs\* artifacts\docs
|
||||||
|
|
||||||
- name: Upload artifacts
|
- name: Upload artifacts
|
||||||
uses: actions/upload-artifact@v3
|
uses: actions/upload-artifact@v3
|
||||||
@@ -119,7 +122,10 @@ jobs:
|
|||||||
- name: Zip binaries
|
- name: Zip binaries
|
||||||
run: |
|
run: |
|
||||||
# The ref resolves to "main" for latest and e.g. "v0.1.0" for tagged.
|
# The ref resolves to "main" for latest and e.g. "v0.1.0" for tagged.
|
||||||
BINARIES_ZIP_NAME=cdc-file-transfer-binaries-${GITHUB_REF#refs/*/}-x64.zip
|
REF=${GITHUB_REF#refs/*/}
|
||||||
|
# For pull requests, this is e.g. '70/merge', so replace / with -.
|
||||||
|
REF=${REF/\//-}
|
||||||
|
BINARIES_ZIP_NAME=cdc-file-transfer-binaries-$REF-x64.zip
|
||||||
echo "BINARIES_ZIP_NAME=$BINARIES_ZIP_NAME" >> $GITHUB_ENV
|
echo "BINARIES_ZIP_NAME=$BINARIES_ZIP_NAME" >> $GITHUB_ENV
|
||||||
zip -j $BINARIES_ZIP_NAME Windows-Artifacts/* Linux-Artifacts/*
|
zip -j $BINARIES_ZIP_NAME Windows-Artifacts/* Linux-Artifacts/*
|
||||||
|
|
||||||
|
|||||||
24
README.md
24
README.md
@@ -192,15 +192,17 @@ remote syncs is being added, see
|
|||||||
# Getting Started
|
# Getting Started
|
||||||
|
|
||||||
Download the precompiled binaries from the
|
Download the precompiled binaries from the
|
||||||
[latest release](https://github.com/google/cdc-file-transfer/releases).
|
[latest release](https://github.com/google/cdc-file-transfer/releases) to a
|
||||||
We currently provide Linux binaries compiled on
|
Windows device and unzip them. The Linux binaries are automatically deployed
|
||||||
|
to `~/.cache/cdc-file-transfer` by the Windows tools. There is no need to manually
|
||||||
|
deploy them. We currently provide Linux binaries compiled on
|
||||||
[Github's latest Ubuntu](https://github.com/actions/runner-images) version.
|
[Github's latest Ubuntu](https://github.com/actions/runner-images) version.
|
||||||
If the binaries work for you, you can skip the following two sections.
|
If the binaries work for you, you can skip the following two sections.
|
||||||
|
|
||||||
Alternatively, the project can be built from source. Some binaries have to be
|
Alternatively, the project can be built from source. Some binaries have to be
|
||||||
built on Windows, some on Linux.
|
built on Windows, some on Linux.
|
||||||
|
|
||||||
## Prerequisites
|
## Prerequisites for Building
|
||||||
|
|
||||||
To build the tools from source, the following steps have to be executed on
|
To build the tools from source, the following steps have to be executed on
|
||||||
**both Windows and Linux**.
|
**both Windows and Linux**.
|
||||||
@@ -223,35 +225,33 @@ The file transfer tools require `ssh.exe` and `sftp.exe`.
|
|||||||
|
|
||||||
## Building
|
## Building
|
||||||
|
|
||||||
The two tools can be built and used independently.
|
The two tools CDC RSync and CDC Stream can be built and used independently.
|
||||||
|
|
||||||
### CDC RSync
|
### CDC RSync
|
||||||
|
|
||||||
* Build Linux components
|
* On a Linux device, build the Linux components
|
||||||
```
|
```
|
||||||
bazel build --config linux --compilation_mode=opt --linkopt=-Wl,--strip-all --copt=-fdata-sections --copt=-ffunction-sections --linkopt=-Wl,--gc-sections //cdc_rsync_server
|
bazel build --config linux --compilation_mode=opt --linkopt=-Wl,--strip-all --copt=-fdata-sections --copt=-ffunction-sections --linkopt=-Wl,--gc-sections //cdc_rsync_server
|
||||||
```
|
```
|
||||||
* Build Windows components
|
* On a Windows device, build the Windows components
|
||||||
```
|
```
|
||||||
bazel build --config windows --compilation_mode=opt --copt=/GL //cdc_rsync
|
bazel build --config windows --compilation_mode=opt --copt=/GL //cdc_rsync
|
||||||
```
|
```
|
||||||
* Copy the Linux build output file `cdc_rsync_server` from
|
* Copy the Linux build output file `cdc_rsync_server` from
|
||||||
`bazel-bin/cdc_rsync_server` on the Linux system to `bazel-bin\cdc_rsync`
|
`bazel-bin/cdc_rsync_server` to `bazel-bin\cdc_rsync` on the Windows machine.
|
||||||
on the Windows machine.
|
|
||||||
|
|
||||||
### CDC Stream
|
### CDC Stream
|
||||||
|
|
||||||
* Build Linux components
|
* On a Linux device, build the Linux components
|
||||||
```
|
```
|
||||||
bazel build --config linux --compilation_mode=opt --linkopt=-Wl,--strip-all --copt=-fdata-sections --copt=-ffunction-sections --linkopt=-Wl,--gc-sections //cdc_fuse_fs
|
bazel build --config linux --compilation_mode=opt --linkopt=-Wl,--strip-all --copt=-fdata-sections --copt=-ffunction-sections --linkopt=-Wl,--gc-sections //cdc_fuse_fs
|
||||||
```
|
```
|
||||||
* Build Windows components
|
* On a Windows device, build the Windows components
|
||||||
```
|
```
|
||||||
bazel build --config windows --compilation_mode=opt --copt=/GL //cdc_stream
|
bazel build --config windows --compilation_mode=opt --copt=/GL //cdc_stream
|
||||||
```
|
```
|
||||||
* Copy the Linux build output files `cdc_fuse_fs` and `libfuse.so` from
|
* Copy the Linux build output files `cdc_fuse_fs` and `libfuse.so` from
|
||||||
`bazel-bin/cdc_fuse_fs` on the Linux system to `bazel-bin\cdc_stream`
|
`bazel-bin/cdc_fuse_fs` to `bazel-bin\cdc_stream` on the Windows machine.
|
||||||
on the Windows machine.
|
|
||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user