ipa包使用命令上傳fir.im或者蒲公英

咱們的工程作了自動打包處理,可是每次打完ipa後只是放置於一個共享盤或者本地,爲了方便測試,每次都要手動上傳上傳fir或者蒲公英,比較麻煩。因此研究了一下怎麼能在打完包後直接腳本上傳到上傳fir或者蒲公英,這樣就能直接發二維碼或者連接給測試人員。api

一.上傳到fir.im

  1.安裝fir-cli

    要上傳fir.im須要先安裝fir-cli工具,推薦使用Homebrew ruby

gem install fir-cli

   2.獲取fir.im的token值

    在「個人應用」頁面右上角,點擊帳號圖標,選擇「API Token」,就會出現你的fir帳號的token值了app

    

  3.發佈ipa

    cd到要上傳的.ipa包目錄下,執行命令便可curl

fir publish .ipa包路徑
#補充命令
  -s, [--short=SHORT]              # Set custom short link(設置後邊的短連接)
  -c, [--changelog=CHANGELOG]      # Set changelog(填寫更新日誌,支持字符串或者文本文件)
  -Q, [--qrcode], [--no-qrcode]    # Generate qrcode(在ipa/apk同級目錄生成下載二維碼)
  -m, [--mappingfile=MAPPINGFILE]  # App mapping file
  -P, [--proj=PROJ]                # Project id in BugHD.com if upload app mapping file
      [--open], [--no-open]        # true/false if open for everyone
      [--password=PASSWORD]        # Set password for app
  -T, [--token=TOKEN]              # User's API Token at fir.im
  -L, [--logfile=LOGFILE]          # Path to writable logfile
  -V, [--verbose], [--no-verbose]  # Show verbose(展現進度詳情)
                                   # Default: true
  -q, [--quiet], [--no-quiet]      # Silence commands
  -h, [--help], [--no-help]        # Show this help message and quit

 2、上傳蒲公英

    蒲公英文檔裏面有詳細說明:http://www.pgyer.com/doc/view/upload_one_command工具

curl -F "file=@{$filePath}" \
-F "uKey={$uKey}" \
-F "_api_key={$apiKey}" \
http://www.pgyer.com/apiv1/app/upload

其中:

{$filePath}是應用安裝包文件的路徑
{$uKey}是開發者的用戶 Key,在應用管理-API中查看
{$apiKey}是開發者的 API Key,在應用管理-API中查看
相關文章
相關標籤/搜索