Compare commits

..

2 Commits

Author SHA1 Message Date
Dennis Schwerdel eb638efadf Fix build for alpha versions 2020-10-09 22:46:44 +02:00
Dennis Schwerdel f824c1f44d Changed Rust version to 1.47.0 2020-10-09 21:18:12 +02:00
8 changed files with 28 additions and 18 deletions

View File

@ -12,22 +12,21 @@ rustup target add aarch64-unknown-linux-gnu
cargo install cargo-deb cargo install cargo-deb
VERSION=$(grep -e '^version =' Cargo.toml | sed -e 's/version = "\(.*\)"/\1/') VERSION=$(grep -e '^version =' Cargo.toml | sed -e 's/version = "\(.*\)"/\1/')
DEB_VERSION=$(echo "$VERSION" | sed -e 's/-/~/g')
mkdir dist mkdir dist
cargo deb cargo deb
cp target/debian/vpncloud_${VERSION}_amd64.deb dist/vpncloud_${VERSION}_amd64.deb cp target/debian/vpncloud_${DEB_VERSION}_amd64.deb dist/vpncloud_${DEB_VERSION}_amd64.deb
# i386 deb # i386 deb
cargo deb --target i686-unknown-linux-gnu cargo deb --target i686-unknown-linux-gnu
cp target/i686-unknown-linux-gnu/debian/vpncloud_${VERSION}_i386.deb dist/vpncloud_${VERSION}_i386.deb cp target/i686-unknown-linux-gnu/debian/vpncloud_${DEB_VERSION}_i386.deb dist/vpncloud_${DEB_VERSION}_i386.deb
# arm7hf deb # arm7hf deb
cargo deb --target armv7-unknown-linux-gnueabihf cargo deb --target armv7-unknown-linux-gnueabihf
cp target/armv7-unknown-linux-gnueabihf/debian/vpncloud_${VERSION}_armhf.deb dist/vpncloud_${VERSION}_armhf.deb cp target/armv7-unknown-linux-gnueabihf/debian/vpncloud_${DEB_VERSION}_armhf.deb dist/vpncloud_${DEB_VERSION}_armhf.deb
# aarch64 deb # aarch64 deb
cargo deb --target aarch64-unknown-linux-gnu cargo deb --target aarch64-unknown-linux-gnu
cp target/aarch64-unknown-linux-gnu/debian/vpncloud_${VERSION}_arm64.deb dist/vpncloud_${VERSION}_arm64.deb cp target/aarch64-unknown-linux-gnu/debian/vpncloud_${DEB_VERSION}_arm64.deb dist/vpncloud_${DEB_VERSION}_arm64.debllll

View File

@ -11,9 +11,14 @@ rustup target add armv7-unknown-linux-gnueabihf
cargo install cargo-rpm cargo install cargo-rpm
VERSION=$(grep -e '^version =' Cargo.toml | sed -e 's/version = "\(.*\)"/\1/') VERSION=$(grep -e '^version =' Cargo.toml | sed -e 's/version = "\(.*\)"/\1/')
if echo "$VERSION" | fgrep -q "-"; then
RPM_VERSION=$(echo "$VERSION" | sed -e 's/-/-0./g')
else
RPM_VERSION="$VERSION-1"
fi
mkdir dist mkdir dist
cargo build --release cargo build --release
cargo rpm build cargo rpm build
cp target/release/rpmbuild/RPMS/x86_64/vpncloud-${VERSION}-1.x86_64.rpm dist/vpncloud_${VERSION}.x86_64.rpm cp target/release/rpmbuild/RPMS/x86_64/vpncloud-${RPM_VERSION}.x86_64.rpm dist/vpncloud_${RPM_VERSION}.x86_64.rpm

View File

@ -11,7 +11,7 @@ jobs:
- name: Run builder - name: Run builder
uses: ./.github/actions/build-deb uses: ./.github/actions/build-deb
with: with:
rust: '1.46.0' rust: '1.47.0'
- name: Archive artifacts - name: Archive artifacts
uses: actions/upload-artifact@v1 uses: actions/upload-artifact@v1
with: with:
@ -31,7 +31,7 @@ jobs:
- name: Run builder - name: Run builder
uses: ./.github/actions/build-rpm uses: ./.github/actions/build-rpm
with: with:
rust: '1.46.0' rust: '1.47.0'
- name: Archive artifacts - name: Archive artifacts
uses: actions/upload-artifact@v1 uses: actions/upload-artifact@v1
with: with:

View File

@ -5,7 +5,7 @@
Name: vpncloud Name: vpncloud
Summary: Peer-to-peer VPN Summary: Peer-to-peer VPN
Version: @@VERSION@@ Version: @@VERSION@@
Release: 1 Release: @@RELEASE@@
License: GPL-3.0 License: GPL-3.0
Group: Applications/System Group: Applications/System
Source0: %{name}-%{version}.tar.gz Source0: %{name}-%{version}.tar.gz

View File

@ -17,7 +17,7 @@ This project follows [semantic versioning](http://semver.org).
- [changed] Rename subnet to claim - [changed] Rename subnet to claim
- [changed] Set peer exchange interval to 5 minutes - [changed] Set peer exchange interval to 5 minutes
- [changed] Periodically send claims with peer list - [changed] Periodically send claims with peer list
- [changed] Changed Rust version to 1.46.0 - [changed] Changed Rust version to 1.47.0
- [removed] Remove network-id parameter - [removed] Remove network-id parameter
- [removed] Remove port config option in favor of --listen - [removed] Remove port config option in favor of --listen

View File

@ -19,7 +19,7 @@ RUN useradd -ms /bin/bash user
USER user USER user
WORKDIR /home/user WORKDIR /home/user
ENV RUST=1.46.0 ENV RUST=1.47.0
RUN curl https://sh.rustup.rs -sSf | sh -s -- -y --default-toolchain ${RUST} RUN curl https://sh.rustup.rs -sSf | sh -s -- -y --default-toolchain ${RUST}

View File

@ -7,7 +7,7 @@ RUN useradd -ms /bin/bash user
USER user USER user
WORKDIR /home/user WORKDIR /home/user
ENV RUST=1.46.0 ENV RUST=1.47.0
RUN curl https://sh.rustup.rs -sSf | sh -s -- -y --default-toolchain ${RUST} RUN curl https://sh.rustup.rs -sSf | sh -s -- -y --default-toolchain ${RUST}

View File

@ -17,6 +17,12 @@ set -e
cd $(dirname $0) cd $(dirname $0)
VERSION=$(grep -e '^version =' ../Cargo.toml | sed -e 's/version = "\(.*\)"/\1/') VERSION=$(grep -e '^version =' ../Cargo.toml | sed -e 's/version = "\(.*\)"/\1/')
DEB_VERSION=$(echo "$VERSION" | sed -e 's/-/~/g')
if echo "$VERSION" | fgrep -q "-"; then
RPM_VERSION=$(echo "$VERSION" | sed -e 's/-/-0./g')
else
RPM_VERSION="$VERSION-1"
fi
mkdir -p cache/{rpm,deb} mkdir -p cache/{rpm,deb}
CACHE=$(pwd)/cache CACHE=$(pwd)/cache
@ -27,23 +33,23 @@ docker build --rm -f=Dockerfile-deb -t vpncloud-builder-deb .
# x86_64 deb # x86_64 deb
docker_cmd deb 'cd code && cargo deb' docker_cmd deb 'cd code && cargo deb'
cp $CACHE/deb/target/debian/vpncloud_${VERSION}_amd64.deb ../dist/vpncloud_${VERSION}_amd64.deb cp $CACHE/deb/target/debian/vpncloud_${DEB_VERSION}_amd64.deb ../dist/vpncloud_${DEB_VERSION}_amd64.deb
# i386 deb # i386 deb
docker_cmd deb 'cd code && cargo deb --target i686-unknown-linux-gnu' docker_cmd deb 'cd code && cargo deb --target i686-unknown-linux-gnu'
cp $CACHE/deb/target/i686-unknown-linux-gnu/debian/vpncloud_${VERSION}_i386.deb ../dist/vpncloud_${VERSION}_i386.deb cp $CACHE/deb/target/i686-unknown-linux-gnu/debian/vpncloud_${DEB_VERSION}_i386.deb ../dist/vpncloud_${DEB_VERSION}_i386.deb
# arm7hf deb # arm7hf deb
docker_cmd deb 'cd code && cargo deb --target armv7-unknown-linux-gnueabihf' docker_cmd deb 'cd code && cargo deb --target armv7-unknown-linux-gnueabihf'
cp $CACHE/deb/target/armv7-unknown-linux-gnueabihf/debian/vpncloud_${VERSION}_armhf.deb ../dist/vpncloud_${VERSION}_armhf.deb cp $CACHE/deb/target/armv7-unknown-linux-gnueabihf/debian/vpncloud_${DEB_VERSION}_armhf.deb ../dist/vpncloud_${DEB_VERSION}_armhf.deb
# aarch64 deb # aarch64 deb
docker_cmd deb 'cd code && cargo deb --target aarch64-unknown-linux-gnu' docker_cmd deb 'cd code && cargo deb --target aarch64-unknown-linux-gnu'
cp $CACHE/deb/target/aarch64-unknown-linux-gnu/debian/vpncloud_${VERSION}_arm64.deb ../dist/vpncloud_${VERSION}_arm64.deb cp $CACHE/deb/target/aarch64-unknown-linux-gnu/debian/vpncloud_${DEB_VERSION}_arm64.deb ../dist/vpncloud_${DEB_VERSION}_arm64.deb
docker build --rm -f=Dockerfile-rpm -t vpncloud-builder-rpm . docker build --rm -f=Dockerfile-rpm -t vpncloud-builder-rpm .
# x86_64 rpm # x86_64 rpm
docker_cmd rpm 'cd code && cargo rpm build' docker_cmd rpm 'cd code && cargo rpm build'
cp $CACHE/rpm/target/release/rpmbuild/RPMS/x86_64/vpncloud-${VERSION}-1.x86_64.rpm ../dist/vpncloud_${VERSION}.x86_64.rpm cp $CACHE/rpm/target/release/rpmbuild/RPMS/x86_64/vpncloud-${RPM_VERSION}.x86_64.rpm ../dist/vpncloud_${RPM_VERSION}.x86_64.rpm