当前位置: 首页 > news >正文

专业的高密做网站的公司网站建设意见和建议

专业的高密做网站的,公司网站建设意见和建议,农村电商怎么赚钱,襄阳市做网站mac环境下#xff0c; 首选需要安装gitlab-runner和fastlane brew install gitlab-runner brew install fastlane 安装完成#xff0c;来到我们在gitlab下新建的Android项目#xff0c;我们开始创建gitlab-runner 1、创建runner 点开runner#xff0c;点击新建runner …mac环境下 首选需要安装gitlab-runner和fastlane brew install gitlab-runner brew install fastlane 安装完成来到我们在gitlab下新建的Android项目我们开始创建gitlab-runner 1、创建runner 点开runner点击新建runner 选择macos自定义一个标签把运行未打标签的作业也够选上点击创建runner 然后来到这个页面开始在终端挨个执行命令 执行命令一定要选择shell可以看到这时候就创建runner成功了 testrunner就是这个runner的名字 gitlab-runner list   执行这个命令可以看到电脑上所有的runner gitlab-runner status  可以查看gitlab-runner的状态 如果状态不在线可以调用gitlab-runner  install 命令  再调用gitlab-runner  start 2、fastlane cd到项目跟目录下使用fastlane init 根目录下就会创建fastlane文件夹 我们要写的代码都在Fastfile中 # This file contains the fastlane.tools configuration # You can find the documentation at https://docs.fastlane.tools # # For a list of all available actions, check out # # https://docs.fastlane.tools/actions # # For a list of all available plugins, check out # # https://docs.fastlane.tools/plugins/available-plugins ## Uncomment the line if you want fastlane to automatically update itself # update_fastlanedefault_platform(:android) APK_TIME Time.now.strftime(%Y%m%d) app_versionName 1.0.0BUILD_NAME # OUTPUT_NAME_PATCH #{BUILD_NAME}_#{PLIST_INFO_VERSION}_#{APK_TIME} platform :android dodesc 给测试用单渠道cnrmall_official的包puts APK_TIME #{APK_TIME}channel cnrmall_officiallane :debug_cnrmall_official doBUILD_NAME android_Debug_#{channel}gradle(task: clean assemble#{channel},build_type: Debug)mk_cp_apkpgyer_upload(channel: #{channel})end#debug全渠道包 lane :debug dochannel cnrmall_officialBUILD_NAME android_Debuggradle(task: clean assemble,build_type: Debug)pgyer_upload(channel: #{channel})end#release全渠道包lane :release dochannel cnrmall_officialBUILD_NAME android_Releasegradle(task: clean assemble,build_type: Release)pgyer_upload(channel: #{channel})end# 执行创建文件夹 copy apk 到最外面目录 lane :mk_cp_apk doputs mk out_apk cp apkgradle(task: customBuild)endlane :get_version doputs Update Android version in build.gradleapp_version gradle(task: getVersionName)# 获取版本号 # puts app_version:#{versionCode}enddesc Submit a new Beta Build to Crashlytics Betalane :beta dogradle(task: clean assembleRelease)crashlytics# sh your_script.sh# You can also use other beta testing services hereenddesc Deploy a new version to the Google Playlane :deploy dogradle(task: clean assembleRelease)upload_to_play_storeend##上传蒲公英lane :pgyer_upload do |option|sh lspyg_get_channel option[:channel]puts 上传蒲公英channel #{pyg_get_channel} # ENV[outPutPath] ../app/build/outputs/apk/#{pyg_get_channel}/debug/cnrmall_#{APK_TIME}_#{app_versionName}_#{pyg_get_channel}.apkENV[outPutPath] ../out_apk/cnrmall_#{APK_TIME}_#{app_versionName}_#{pyg_get_channel}.apkputs outPutPath路径- #{ENV[outPutPath]} # ENV[outPutPath] ../app/build/outputs/apk/option/debug/cnrmall_#{APK_TIME}_1.0.0_cnrmall_official.apk # sh open ../app/build/outputs/apk/debug/sh ./pgyer_upload.sh -k 4df7384110457be3f5bce0c391ef1cd3 #{ENV[outPutPath]} endend上传蒲公英脚本 #!/bin/bash # # 通过shell脚本来实现将本地app文件通过API上传到蒲公英 # https://www.pgyer.com/doc/view/api#fastUploadApp ## Display log. 1enable, 0disable LOG_ENABLE1printHelp() {echo Usage: $0 -k api_key [OPTION]... fileecho Upload iOS or Android app package file to PGYER.echo Example: $0 -k xxxxxxxxxxxxxxx /data/app.apkecho echo Description:echo -k api_key (required) api key from PGYERecho -t buildInstallType build install type, 1public, 2password, 3inviteecho -p buildPassword build password, required if buildInstallType2echo -d buildUpdateDescription build update descriptionecho -e buildInstallDate build install date, 1buildInstallStartDate~buildInstallEndDate, 2foreverecho -s buildInstallStartDate build install start date, format: yyyy-MM-ddecho -e buildInstallEndDate build install end date, format: yyyy-MM-ddecho -c buildChannelShortcut build channel shortcutecho -h help show this helpecho echo Report bugs to: https://github.com/PGYER/pgyer_api_example/issues echo Project home page: https://github.com/PGYER/pgyer_api_example exit 1 }while getopts k:t:p:d:s:e:c:h OPT; docase $OPT ink) api_key$OPTARG;;t) buildInstallType$OPTARG;;p) buildPassword$OPTARG;;d) buildUpdateDescription$OPTARG;;e) buildInstallDate$OPTARG;;s) buildInstallStartDate$OPTARG;;e) buildInstallEndDate$OPTARG;;c) buildChannelShortcut$OPTARG;;?) printHelp;;esac doneshift $(($OPTIND - 1)) readonly file$1# check api_key exists if [ -z $api_key ]; thenecho api_key is emptyprintHelp fi# check file exists if [ ! -f $file ]; thenecho file not existsprintHelp fi# check ext supported buildType${file##*.} if [ $buildType ! ] [ $buildType ! apk ]; thenecho file ext is not supportedprintHelp fi# --------------------------------------------------------------- # functions # ---------------------------------------------------------------log() {[ $LOG_ENABLE -eq 1 ] echo [$(date %Y-%m-%d %H:%M:%S)] $* }logTitle() {log -------------------------------- $* -------------------------------- }execCommand() {log $result$(eval $) }# --------------------------------------------------------------- # 获取上传凭证 # ---------------------------------------------------------------logTitle 获取凭证commandcurl -s [ -n $api_key ] command${command} --form-string _api_key${api_key}; [ -n $buildType ] command${command} --form-string buildType${buildType}; [ -n $buildInstallType ] command${command} --form-string buildInstallType${buildInstallType}; [ -n $buildPassword ] command${command} --form-string buildPassword${buildPassword}; [ -n $buildUpdateDescription ] command${command} --form-string $buildUpdateDescription${buildUpdateDescription}; [ -n $buildInstallDate ] command${command} --form-string buildInstallDate${buildInstallDate}; [ -n $buildInstallStartDate ] command${command} --form-string buildInstallStartDate${buildInstallStartDate}; [ -n $buildInstallEndDate ] command${command} --form-string buildInstallEndDate${buildInstallEndDate}; [ -n $buildChannelShortcut ] command${command} --form-string buildChannelShortcut${buildChannelShortcut}; command${command} http://www.pgyer.com/apiv2/app/getCOSToken; execCommand $command[[ ${result} ~ \endpoint\:\([\:\_\.\/\\A-Za-z0-9\-])\ ]] endpointecho ${BASH_REMATCH[1]} | sed s!\\\/!/!g [[ ${result} ~ \key\:\([\.a-z0-9])\ ]] keyecho ${BASH_REMATCH[1]} [[ ${result} ~ \signature\:\([\\\_\;A-Za-z0-9\-])\ ]] signatureecho ${BASH_REMATCH[1]} [[ ${result} ~ \x-cos-security-token\:\([\_A-Za-z0-9\-])\ ]] x_cos_security_tokenecho ${BASH_REMATCH[1]}if [ -z $key ] || [ -z $signature ] || [ -z $x_cos_security_token ] || [ -z $endpoint ]; thenlog get upload token failedexit 1 fi# --------------------------------------------------------------- # 上传文件 # ---------------------------------------------------------------logTitle 上传文件file_name${file##*/}execCommand curl --progress-bar -o /dev/null -w %{http_code} \ --form-string key${key} \ --form-string signature${signature} \ --form-string x-cos-security-token${x_cos_security_token} \ --form-string x-cos-meta-file-name${file_name} \ -F file${file} ${endpoint} if [ $result -ne 204 ]; then # if http code ! 204, upload failedlog Upload failedexit 1 fi# --------------------------------------------------------------- # 检查结果 # ---------------------------------------------------------------logTitle 检查结果# 获取 .apk 文件所在的目录 Directory$(dirname $file)echo 获取 .apk 文件所在的目录 $DirectoryjsonFilePath$Directory/result.json qrCodeFilePath$Directory/qr_code.pngfor i in {1..60}; doexecCommand curl -s http://www.pgyer.com/apiv2/app/buildInfo?_api_key${api_key}\buildKey${key}[[ ${result} ~ \code\:([0-9]) ]] codeecho ${BASH_REMATCH[1]}if [ $code -eq 0 ]; thenecho $resultecho $result $jsonFilePath # 将 JSON 保存到文件# 提取 buildQRCodeURL 的值 # qrCodeURL$(jq -r .data.buildQRCodeURL $result)qrCodeURL$(echo $result | grep -o buildQRCodeURL:[^]* | cut -d -f 4 | sed s/\\//g)# 使用 curl 下载并保存 QR Code 文件echo Downloading QR Code from: $qrCodeURL# curl -s $qrCodeURL -o $qrCodeFilePathcurl --location-trusted -o $qrCodeFilePath $qrCodeURLecho curl Result: $curlResultbreakelsesleep 1fi done .gitlab-ci.yml只需要写上执行哪个fastlane即可 debug_cnrmall_official是fastlane名字 在Android studio中的Terminal中也可以使用命令去执行某一个fastlane 如fastlane lane:debug_cnrmall_official stages:- buildjob:stage: buildscript:- echo 开始打包4- ls -a# - ./build.sh- fastlane debug_cnrmall_officialartifacts:paths:- out_apk/* 项目跟目录的build.gradle文件中还自定义了一个task 因为Android默认打包完的apk位置太深了所以把它复制到外面一点方便测试拿到 cnrmallshop_ci_2.0是项目名 out_apk是创建的文件夹 task customBuild(type: Exec) {def date new SimpleDateFormat(yyyyMMdd).format(new Date())def versionName rootProject.android.versionNamecommandLine sh,-c,mkdir -p ../cnrmallshop_ci_2.0/out_apk cp app/build/outputs/apk/cnrmall_official/debug/cnrmall_date_versionName_cnrmall_official.apk ../cnrmallshop_ci_2.0/out_apk/cnrmall_date_versionName_cnrmall_official.apk } 最后可以在流水线上中看到构建成功的流水线可以点击下载按钮下载产物 ​​​​​​​ 产物中有apk有二维码
http://www.w-s-a.com/news/288640/

相关文章:

  • 做物品租赁网站网站建设的完整流程
  • 响应式企业网站开发所用的平台西安知名网站推广
  • 高端响应式网站建设wordpress 全屏主题
  • 国内工程机械行业网站建设现状ui是什么意思
  • 成都网站开发哪家公司好出售家教网站模板
  • 订阅号做流量 那些电影如何链接网站温州市建设监理协会网站
  • 成都网站建设成功案例单招网商丘网站建设大全
  • 受欢迎的购物网站建设网推专员是做什么的
  • 商城网站前期准备湖南郴州建设局网站
  • 企业如何在自己的网站上做宣传外贸自建站可以自己做网站吗
  • 甘肃网站建设制作商网站空间哪家公司的好
  • 思途旅游网站建设系统用vscode做网站
  • 广州站改造最新消息半年工作总结ppt模板
  • logo模板下载网站推荐哪家网站开发培训好
  • 做外贸网站效果图页面关键词优化
  • 广平网站建设成都活动轨迹
  • 小型网站网站建设需要网络公司是什么行业
  • 滑动 手机网站 代码网页制作与设计讨论
  • 自己做网站处理图片用什么软件wordpress html5支持
  • 校园网站怎么建软文文案范文
  • 中国建设官方网站如何创建自己的软件
  • 来宾住房与城乡建设网站天津西青区怎么样
  • 西安网站建设培训班鄂州网页定制
  • 西部数码网站备份自己怎么做网站啊
  • h5网站开发用什么软件制作公司网站建设代理怎么做
  • 网站建设资料准备网上购物app有哪些
  • 沧州做网站优化哪家公司便宜国内百度云网站建设
  • 网站的最近浏览 怎么做龙岩市人才网最新招聘信息
  • 网站建设需要找工信部吗网站开发账务处理
  • 做那种的视频网站个体工商网站备案