Skip to content

Commit f93fbc9

Browse files
committed
Release rclone with golang-1.22.12 on 04.04.2025
1 parent 4a7fb0c commit f93fbc9

File tree

8 files changed

+89
-1
lines changed

8 files changed

+89
-1
lines changed

.gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
go*
2+

3.11/rclone.env

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
RCLONE_VERSION="v1.62.2"

3.11/targets.env

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
TARGETS="linux_amd64 linux_arm64 windows_amd64"

3.12/rclone.env

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
RCLONE_VERSION="v1.65.2"

3.12/targets.env

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
TARGETS="linux_amd64 linux_arm64"

README.md

+33-1
Original file line numberDiff line numberDiff line change
@@ -1 +1,33 @@
1-
# rclone-arangodb
1+
# rclone-arangodb
2+
3+
This repository was made to deliver recompiled rclone versions included into
4+
ArangoDB <MAJOR>.<MINOR> branches releases.
5+
6+
Each <MAJOR>.<MINOR> branch tied to the specific rclone version which cannot be
7+
changed over time to remain backwards compatibility. However in case of any
8+
additional CVEs there is a need to rebuild it with newer toolchain (either by
9+
raising golang version or updating dependent components).
10+
11+
## How to make a release
12+
13+
### Prerequisites
14+
15+
In order to make a release with newer toolchain the following prerequisites are
16+
required:
17+
- `git` latest stable version
18+
- `docker` latest stable version
19+
20+
### Steps
21+
22+
- create a commit with necessary changes if needed:
23+
- set `golang` version within `./toolchain.env`
24+
- check `<MAJOR>.<MINOR>` used rclone version in `rclone.env` and produced
25+
targets within `targets.env`
26+
- update `./make_release.sh` script in case dependant components are rclone
27+
must be upgraded
28+
- run `./make_release.sh` to produce necessary binaries:
29+
- `golang-<GO_VERSION>-<COMMIT>` folder with necessary structure and binaries
30+
should be produced
31+
- push local changes to GitHub
32+
- make tagged release `golang-<GO_VERSION>-<COMMIT>` with artifacts and
33+
structure of the produced local folder of the tag's name

make_release.sh

+49
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
#!/bin/bash
2+
3+
set -e
4+
5+
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
6+
cd ${SCRIPT_DIR}
7+
. ./toolchain.env
8+
9+
printf "Making release of rclone for ArangoDB with $GO_VERSION...\n\n"
10+
11+
RELEASE_TAG="${GO_VERSION//:/-}-$(git rev-parse --short HEAD)"
12+
RELEASE_OUTPUT=${SCRIPT_DIR}/${RELEASE_TAG}
13+
rm -rf ${RELEASE_OUTPUT} && mkdir -p ${RELEASE_OUTPUT}
14+
15+
for ARANGODB in $(echo 3.*)
16+
do
17+
cd ${SCRIPT_DIR}/${ARANGODB}
18+
19+
. ./rclone.env
20+
21+
printf "Making release of rclone for ArangoDB $ARANGODB...\n\n"
22+
23+
. ./targets.env
24+
rm -rf ./rclone && \
25+
git clone --single-branch --depth 1 -b ${RCLONE_VERSION} https://github.com/rclone/rclone.git && cd ./rclone
26+
27+
for TARGET in ${TARGETS}
28+
do
29+
TARGET_OS="${TARGET%_*}"
30+
TARGET_ARCH="${TARGET#*_}"
31+
printf "Building rclone $RCLONE_VERSION for $TARGET_OS-$TARGET_ARCH...\n\n"continue
32+
docker run --rm -v "$(pwd):/rclone" \
33+
-v "${HOME}:/user" \
34+
-e "GOPATH=/user/rclone_go/go" \
35+
-e "GOCACHE=/user/rclone_go/cache" \
36+
-e "RCLONE_OUTPUT=${RELEASE_TAG}_${ARANGODB}_${RCLONE_VERSION}" \
37+
-e "TARGET_OS=$TARGET_OS" \
38+
-e "TARGET_ARCH=$TARGET_ARCH" \
39+
-u "${UID}:${GID}" \
40+
-w /rclone ${GO_VERSION} \
41+
bash +x -c 'cd /rclone; go mod vendor; go get -u github.com/cloudflare/circl; go get -u github.com/Azure/azure-sdk-for-go/sdk/azidentity; go get -u golang.org/x/crypto; go get google.golang.org/api; go mod tidy; go mod vendor; function build { GOOS=$1 GOARCH=$2 CGO_ENABLED=0 go build -trimpath -ldflags="-s -w -X github.com/rclone/rclone/fs.VersionSuffix= " -tags cmount -o /rclone/${RCLONE_OUTPUT}_rclone-arangodb-$(echo $1 | sed "s/darwin/macos/g")-$2$([[ $1 == "windows" ]] && echo ".exe"); }; go get -u golang.org/x/sys; build $TARGET_OS $TARGET_ARCH' && \
42+
mv ./*rclone-arangodb-*-* "${RELEASE_OUTPUT}" && rm -rf ./*rclone-arangodb-*-*
43+
printf "\n\nDone building rclone $RCLONE_VERSION for $TARGET_OS-$TARGET_ARCH!\n\n"
44+
done
45+
printf "\n\nDone making release of rclone for ArangoDB $ARANGODB!\n\n"
46+
rm -rf ${SCRIPT_DIR}/${ARANGODB}/rclone
47+
done
48+
49+
printf "\n\nDone making release of rclone for ArangoDB with $GO_VERSION!\n\n"

toolchain.env

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
GO_VERSION="golang:1.22.12"

0 commit comments

Comments
 (0)