From 0bd717381a2ba26e0f7893cdd49adab234879daf Mon Sep 17 00:00:00 2001 From: Martin Finkel <me@martinfinkel.com> Date: Wed, 8 Jun 2022 15:43:20 +0700 Subject: [PATCH 1/4] build: specify and bump libvlc-sys version cargo publish --dry-run Updating crates.io index error: all dependencies must have a version specified when publishing. dependency `libvlc-sys` does not specify a version --- Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index 7382cb0..58a9caf 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -19,7 +19,7 @@ crate-type = ["rlib"] [dependencies] libc = "0.2" -libvlc-sys = { path = "libvlc-sys" } +libvlc-sys = { version = "0.2.0", path = "libvlc-sys" } [features] default = [] From 04c32cc81a79e5b5b4086174c1febe40aeaec281 Mon Sep 17 00:00:00 2001 From: Martin Finkel <me@martinfinkel.com> Date: Wed, 8 Jun 2022 15:44:14 +0700 Subject: [PATCH 2/4] bump version --- Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index 58a9caf..a19f7b3 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "vlc-rs" -version = "0.3.0" +version = "0.4.0" authors = ["T. Okubo <t.okubo.rx78+github@gmail.com>"] description = "Rust bindings for libVLC media framework." From 7a60b835b305e0507a74f00137080b49c8d607b5 Mon Sep 17 00:00:00 2001 From: Martin Finkel <me@martinfinkel.com> Date: Wed, 8 Jun 2022 16:07:05 +0700 Subject: [PATCH 3/4] build: fix cargo publish --- Cargo.toml | 3 --- libvlc-sys/Cargo.toml | 8 ++------ 2 files changed, 2 insertions(+), 9 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index a19f7b3..9f9703b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -21,6 +21,3 @@ crate-type = ["rlib"] libc = "0.2" libvlc-sys = { version = "0.2.0", path = "libvlc-sys" } -[features] -default = [] -use-bindgen = ["libvlc-sys/use-bindgen"] diff --git a/libvlc-sys/Cargo.toml b/libvlc-sys/Cargo.toml index c437a6c..8cc9a0f 100644 --- a/libvlc-sys/Cargo.toml +++ b/libvlc-sys/Cargo.toml @@ -21,12 +21,8 @@ crate-type = ["rlib"] libc = "0.2" [build-dependencies] -bindgen = {version = "0.59", optional = true } +bindgen = {version = "0.59"} pkg-config = "0.3" [target.'cfg(target_os = "windows")'.build-dependencies] -vswhom = "0.1.0" - -[features] -default = [] -use-bindgen = ["bindgen"] +vswhom = "0.1.0" \ No newline at end of file From d3fab315ad02f35f4fb394b6f2812afb6fb63ca7 Mon Sep 17 00:00:00 2001 From: Martin Finkel <me@martinfinkel.com> Date: Wed, 8 Jun 2022 16:09:54 +0700 Subject: [PATCH 4/4] gitlab: add deploy step --- .gitlab-ci.yml | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 1fc3550..7e417c1 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,5 +1,6 @@ stages: - build + - deploy variables: VLC_UBUNTU_IMAGE: registry.videolan.org/vlc-rs-libvlc-stable-ubuntu:20211117143343 @@ -15,3 +16,23 @@ vlc-rs-build: script: - . $CARGO_HOME/env - cargo build --all + +vlc-rs-deploy: + tags: + - docker + - amd64 + stage: deploy + image: + name: $VLC_UBUNTU_IMAGE + variables: + # CARGO_TOKEN: $CARGO_TOKEN + rules: + - if: '$CI_COMMIT_TAG =~ /^(\d+\.)?(\d+\.)?(\*|\d+)/' + script: + - . $CARGO_HOME/env + # - cargo publish --token "$CARGO_TOKEN" + - cargo publish --dry-run + artifacts: + name: "${CI_COMMIT_TAG}" + paths: + - target/package/vlc-rs-*.crate \ No newline at end of file