[Android] Add a fastlane lane to upload a release to the FTP
Nicolas Pomepuy
git at videolan.org
Tue Oct 6 10:58:46 CEST 2020
vlc-android | branch: 3.3.x | Nicolas Pomepuy <nicolas at videolabs.io> | Fri Oct 2 08:59:04 2020 +0200| [1017e224a8fd2d02a1488957e372c745a0595313] | committer: Nicolas Pomepuy
Add a fastlane lane to upload a release to the FTP
(cherry picked from commit 28400bf95b22b7bed6a0590f1d829f68e6cfdc7d)
> https://code.videolan.org/videolan/vlc-android/commit/1017e224a8fd2d02a1488957e372c745a0595313
---
buildsystem/automation/README.md | 13 ++++++++-
buildsystem/automation/fastlane/Fastfile | 43 +++++++++++++++++++++++++++++-
buildsystem/automation/fastlane/Pluginfile | 1 +
3 files changed, 55 insertions(+), 2 deletions(-)
diff --git a/buildsystem/automation/README.md b/buildsystem/automation/README.md
index 79b19110f..9415f0652 100644
--- a/buildsystem/automation/README.md
+++ b/buildsystem/automation/README.md
@@ -61,12 +61,23 @@ VLC-Android-3.3.1-Beta-1-x86_64.apk
**Prerequisites**:
-you need to export 3 env variables: HUAWEI_CLIENT_ID, HUAWEI_CLIENT_SECRET and HUAWEI_APP_ID
+You need to export 3 env variables: HUAWEI_CLIENT_ID, HUAWEI_CLIENT_SECRET and HUAWEI_APP_ID
- `deploy_huawei` sends a release to the Huawei AppGallery in draft
Options: `version` is the version string in the apk name.
+#### FTP
+
+**Prerequisites**:
+
+You need to export 1 env variable: VIDEOLAN_FTP_HOST
+
+- `deploy_ftp`
+
+Options: `version` is the version string in the apk name.
+
+The 4 apks will be uploaded in the `/incoming/[version]` folder of the FTP with anonymous credentials
### Screenshots
diff --git a/buildsystem/automation/fastlane/Fastfile b/buildsystem/automation/fastlane/Fastfile
index 378ad7433..89c473926 100644
--- a/buildsystem/automation/fastlane/Fastfile
+++ b/buildsystem/automation/fastlane/Fastfile
@@ -28,7 +28,7 @@ platform :android do
end
lane :deploy_screenshots do
- upload_to_play_store(skip_upload_changelogs:true, skip_upload_images:true, skip_upload_apk:true, release_status:"draft", apk_paths:["VLC-Android-3.3.0-arm64-v8a.apk", "VLC-Android-3.3.0-armeabi-v7a.apk", "VLC-Android-3.3.0-x86.apk", "VLC-Android-3.3.0-x86_64.apk"])
+ upload_to_play_store(skip_upload_changelogs:true, skip_upload_images:true, skip_upload_apk:true, release_status:"draft")
slack(message: 'Successfully uploaded screenshots to Play Store')
end
@@ -81,4 +81,45 @@ platform :android do
slack(message: 'Successfully created a new draft for '+options[:version]+' on Huawei AppGallery')
end
+ lane :deploy_ftp do |options|
+ #gradle(task: 'assemble', build_type: 'Release')
+ ftp(
+ host: ENV["VIDEOLAN_FTP_HOST"],
+ username: 'anonymous',
+ password: '',
+ upload:{
+ src: "./VLC-Android-"+options[:version]+"-arm64-v8a.apk",
+ dest: "/incoming/"+options[:version]
+ }
+ )
+ ftp(
+ host: ENV["VIDEOLAN_FTP_HOST"],
+ username: 'anonymous',
+ password: '',
+ upload:{
+ src: "./VLC-Android-"+options[:version]+"-armeabi-v7a.apk",
+ dest: "/incoming/"+options[:version]
+ }
+ )
+ ftp(
+ host: ENV["VIDEOLAN_FTP_HOST"],
+ username: 'anonymous',
+ password: '',
+ upload:{
+ src: "./VLC-Android-"+options[:version]+"-x86.apk",
+ dest: "/incoming/"+options[:version]
+ }
+ )
+ ftp(
+ host: ENV["VIDEOLAN_FTP_HOST"],
+ username: 'anonymous',
+ password: '',
+ upload:{
+ src: "./VLC-Android-"+options[:version]+"-x86_64.apk",
+ dest: "/incoming/"+options[:version]
+ }
+ )
+ slack(message: 'Successfully uploaded '+options[:version]+' to FTP')
+ end
+
end
diff --git a/buildsystem/automation/fastlane/Pluginfile b/buildsystem/automation/fastlane/Pluginfile
index 67ece5837..e397c2d9e 100644
--- a/buildsystem/automation/fastlane/Pluginfile
+++ b/buildsystem/automation/fastlane/Pluginfile
@@ -3,3 +3,4 @@
# Ensure this file is checked in to source control!
gem 'fastlane-plugin-huawei_appgallery_connect'
+gem 'fastlane-plugin-ftp'
More information about the Android
mailing list