1. 程式人生 > >自動化打包上傳至 fir.im 蒲公英 pre.im

自動化打包上傳至 fir.im 蒲公英 pre.im

蒲公英平臺請移步http://www.jianshu.com/p/c69deb29720d
fir.im平臺請移步http://www.jianshu.com/p/a17167274463
gitLab程式碼管理需要SSH ,生成方法如下:
開啟終端:$ ssh -v
檢視ssh版本
OpenSSH_6.2p2, OSSLShim 0.9.8r 8 Dec 2011
usage: ssh [-1246AaCfgKkMNnqsTtVvXxYy] [-b bind_address] [-c cipher_spec]
[-D [bind_address:]port] [-e escape_char] [-F configfile]
[-I pkcs11] [-i identity_file]
[-L [bind_address:]port:host:hostport]
[-l login_name] [-m mac_spec] [-O ctl_cmd] [-o option] [-p port]
[-R [bind_address:]port:host:hostport] [-S ctl_path]
[-W host:port] [-w local_tun[:remote_tun]]
[

[email protected]]hostname [command]
這個表明ssh已經安裝,
開啟終端,$ ssh-keygen 一路enter下。
生成 在當前使用者名稱下 會有一個.sh檔案。
檢視 .ssh
$ ls -a ~/.ssh 通過搜尋目錄
id_rsa
id_rsa.pub
使用命令 vim ~/.ssh/id_rsa.pub 開啟 id_rsa.pub檔案 裡面就有需要的ssh key。將.pub中的多有內容拷貝出來填到git賬戶裡面就ok了

fir上傳
fir p ${WORKSPACE}/build/TestJenkins.ipa -T #API Token#
其中${WORKSPACE}
/build/ 為.ipa的輸出路徑,#API Token#為fir.im的API Token。
蒲公英上傳
curl -F "file=@{$filePath}" \
-F "uKey={$uKey}" \
-F "_api_key={$apiKey}" \
https://www.pgyer.com/apiv1/app/upload

{$filePath}是應用安裝包檔案的路徑
{$uKey}是開發者的使用者 Key,在應用管理-API中檢視
{$apiKey}是開發者的 API Key,在應用管理-API中檢視
pre.im上傳
curl -F "[email protected]" -F "user_key={user_key}"
-F "update_notify=1" http://pre.im/api/v1/app/upload user_key Y(必須) pre平臺獲取 file Y(必須) 需要上傳的ipa或者apk檔案 password N(非必須) 下載密碼 (傳空字串或不傳則不設定密碼) update_notify N(非必須) 向內測成員釋出新版通知 (1:開啟)