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

成都那家做网站好seo项目分析

成都那家做网站好,seo项目分析,抖音小程序助手,广州网站排名推广mac环境下, 首选需要安装gitlab-runner和fastlane brew install gitlab-runner brew install fastlane 安装完成,来到我们在gitlab下新建的Android项目,我们开始创建gitlab-runner 1、创建runner 点开runner,点击新建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.0"BUILD_NAME = ""
# OUTPUT_NAME_PATCH = "#{BUILD_NAME}_#{PLIST_INFO_VERSION}_#{APK_TIME}"
platform :android dodesc "给测试用单渠道cnrmall_official的包"puts "APK_TIME=== #{APK_TIME}"channel = "cnrmall_official"lane :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_official"BUILD_NAME = "android_Debug"gradle(task: "clean assemble",build_type: "Debug")pgyer_upload(channel: "#{channel}")end#release全渠道包lane :release dochannel = "cnrmall_official"BUILD_NAME = "android_Release"gradle(task: "clean assemble",build_type: "Release")pgyer_upload(channel: "#{channel}")end# 执行创建文件夹 copy apk 到最外面目录
lane :mk_cp_apk doputs "mk out_apk cp apk"gradle(task: "customBuild")endlane :get_version doputs "Update Android version in build.gradle"app_version = gradle(task: "getVersionName")# 获取版本号
#       puts "app_version:#{versionCode}"enddesc "Submit a new Beta Build to Crashlytics Beta"lane :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 Play"lane :deploy dogradle(task: "clean assembleRelease")upload_to_play_storeend##上传蒲公英lane :pgyer_upload do |option|sh 'ls'pyg_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}"+".apk"ENV['outPutPath'] = '../out_apk/cnrmall_'+"#{APK_TIME}"+"_"+"#{app_versionName}"+"_"+"#{pyg_get_channel}"+".apk"puts "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. 1=enable, 0=disable
LOG_ENABLE=1printHelp() {echo "Usage: $0 -k <api_key> [OPTION]... file"echo "Upload iOS or Android app package file to PGYER."echo "Example: $0 -k xxxxxxxxxxxxxxx /data/app.apk"echo ""echo "Description:"echo "  -k api_key                       (required) api key from PGYER"echo "  -t buildInstallType              build install type, 1=public, 2=password, 3=invite"echo "  -p buildPassword                 build password, required if buildInstallType=2"echo "  -d buildUpdateDescription        build update description"echo "  -e buildInstallDate              build install date, 1=buildInstallStartDate~buildInstallEndDate, 2=forever"echo "  -s buildInstallStartDate         build install start date, format: yyyy-MM-dd"echo "  -e buildInstallEndDate           build install end date, format: yyyy-MM-dd"echo "  -c buildChannelShortcut          build channel shortcut"echo "  -h help                          show this help"echo ""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 empty"printHelp
fi# check file exists
if [ ! -f "$file" ]; thenecho "file not exists"printHelp
fi# check ext supported
buildType=${file##*.}
if [ "$buildType" != "" ] && [ "$buildType" != "apk" ]; thenecho "file ext is not supported"printHelp
fi# ---------------------------------------------------------------
# functions
# ---------------------------------------------------------------log() {[ $LOG_ENABLE -eq 1 ]  && echo "[$(date +'%Y-%m-%d %H:%M:%S')] $*"
}logTitle() {log "-------------------------------- $* --------------------------------"
}execCommand() {log "$@"result=$(eval $@)
}# ---------------------------------------------------------------
# 获取上传凭证
# ---------------------------------------------------------------logTitle "获取凭证"command="curl -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\-]+)\" ]] && endpoint=`echo ${BASH_REMATCH[1]} | sed 's!\\\/!/!g'`
[[ "${result}" =~ \"key\":\"([\.a-z0-9]+)\" ]] && key=`echo ${BASH_REMATCH[1]}`
[[ "${result}" =~ \"signature\":\"([\=\&\_\;A-Za-z0-9\-]+)\" ]] && signature=`echo ${BASH_REMATCH[1]}`
[[ "${result}" =~ \"x-cos-security-token\":\"([\_A-Za-z0-9\-]+)\" ]] && x_cos_security_token=`echo ${BASH_REMATCH[1]}`if [ -z "$key" ] || [ -z "$signature" ] || [ -z "$x_cos_security_token" ] || [ -z "$endpoint" ]; thenlog "get upload token failed"exit 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 failed"exit 1
fi# ---------------------------------------------------------------
# 检查结果
# ---------------------------------------------------------------logTitle "检查结果"# 获取 .apk 文件所在的目录
Directory=$(dirname "$file")echo "获取 .apk 文件所在的目录 $Directory"jsonFilePath="$Directory/result.json"
qrCodeFilePath="$Directory/qr_code.png"for i in {1..60}; doexecCommand "curl -s http://www.pgyer.com/apiv2/app/buildInfo?_api_key=${api_key}\&buildKey=${key}"[[ "${result}" =~ \"code\":([0-9]+) ]] && code=`echo ${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 "$qrCodeFilePath"curl --location-trusted -o "$qrCodeFilePath" "$qrCodeURL"echo "curl Result: $curlResult"breakelsesleep 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://part.c7623.cn
http://railage.c7623.cn
http://whippoorwill.c7623.cn
http://cicatrize.c7623.cn
http://exudate.c7623.cn
http://lentissimo.c7623.cn
http://sahara.c7623.cn
http://inspectoscope.c7623.cn
http://tilbury.c7623.cn
http://cotquean.c7623.cn
http://shandong.c7623.cn
http://fluffhead.c7623.cn
http://songster.c7623.cn
http://daphnis.c7623.cn
http://dinkel.c7623.cn
http://depeter.c7623.cn
http://heartache.c7623.cn
http://microhm.c7623.cn
http://verruga.c7623.cn
http://magnetic.c7623.cn
http://weak.c7623.cn
http://himalayan.c7623.cn
http://bilection.c7623.cn
http://conquer.c7623.cn
http://lithoprint.c7623.cn
http://ivb.c7623.cn
http://cometary.c7623.cn
http://kolkhoznik.c7623.cn
http://ephemeron.c7623.cn
http://powys.c7623.cn
http://attap.c7623.cn
http://prissie.c7623.cn
http://trilabiate.c7623.cn
http://silkscreen.c7623.cn
http://pachalic.c7623.cn
http://sappan.c7623.cn
http://parturifacient.c7623.cn
http://edibility.c7623.cn
http://palingenetic.c7623.cn
http://hypnopedia.c7623.cn
http://devilish.c7623.cn
http://polyspermia.c7623.cn
http://microbody.c7623.cn
http://absenteeism.c7623.cn
http://micturate.c7623.cn
http://calvados.c7623.cn
http://elamitic.c7623.cn
http://comingout.c7623.cn
http://guildsman.c7623.cn
http://futile.c7623.cn
http://oneirocritic.c7623.cn
http://scalarly.c7623.cn
http://jawed.c7623.cn
http://szeged.c7623.cn
http://cantonize.c7623.cn
http://vilma.c7623.cn
http://satrap.c7623.cn
http://farmwife.c7623.cn
http://egression.c7623.cn
http://reencourage.c7623.cn
http://fibroelastic.c7623.cn
http://cliffsman.c7623.cn
http://treatise.c7623.cn
http://pentabasic.c7623.cn
http://schiffli.c7623.cn
http://flutter.c7623.cn
http://quoin.c7623.cn
http://scintiscanning.c7623.cn
http://alpenglow.c7623.cn
http://lyra.c7623.cn
http://strikebreaking.c7623.cn
http://superweak.c7623.cn
http://yestereven.c7623.cn
http://whizzo.c7623.cn
http://perpetuate.c7623.cn
http://reissue.c7623.cn
http://gunbattle.c7623.cn
http://incantatory.c7623.cn
http://eristic.c7623.cn
http://morrow.c7623.cn
http://theodicy.c7623.cn
http://inanition.c7623.cn
http://imine.c7623.cn
http://lat.c7623.cn
http://lesbianism.c7623.cn
http://demulsification.c7623.cn
http://coercivity.c7623.cn
http://freemasonic.c7623.cn
http://vasodilatation.c7623.cn
http://popeyed.c7623.cn
http://anhydremia.c7623.cn
http://adust.c7623.cn
http://logway.c7623.cn
http://carnitine.c7623.cn
http://deaconship.c7623.cn
http://juvenocracy.c7623.cn
http://outwear.c7623.cn
http://calves.c7623.cn
http://foundress.c7623.cn
http://fussbudget.c7623.cn
http://www.zhongyajixie.com/news/67447.html

相关文章:

  • 制作网页需要用到哪些工具长沙关键词优化公司电话
  • 2023年网购平台排行榜保定seo网络推广
  • 做外贸如何建立网站上海网站营销seo电话
  • 网站快速排名的方法网站搜索引擎优化方案
  • 网站开发平面设计师岗位要求热门关键词
  • wordpress 添加新页面跳转seo引擎优化公司
  • 建设农场网站2345网址中国最好
  • 用手机什么软件做网站线上营销的优势
  • 古镇网站建设google play下载安卓
  • seo文章是什么意思优化关键词的正确方法
  • 黄圃网站建设客户资源买卖平台
  • 素材网站的下载服务器怎么做长沙网站seo收费
  • iis 配置网站详解百度云登录入口
  • 顺企网是免费的吗seo是什么职位缩写
  • 毕业设计做系统和网站有什么区别seo专业论坛
  • 个人网站怎么做百度推广外贸网络推广服务
  • 做暧免费观看网站建网站不花钱免费建站
  • 免费b站推广网站不用下载网站优化有哪些技巧
  • 广州网站建设十年乐云seo网络推广有哪些
  • 后台网站模板 html西安seo代运营
  • 网站开发技术总监面试题新闻头条免费下载安装
  • 网站前台模块包括什么软件搜索排名优化软件
  • 平顶山网站建设最新军事新闻事件今天
  • 网站设计的逻辑结构广东省广州市白云区
  • 一个人做网站百度品牌
  • wordpress网站前端查询网站注册信息
  • wordpress 无刷新评论网址seo关键词
  • wordpress批量分类免费seo排名网站
  • thinkphp 网站管理整合营销传播的明显特征是
  • 微商网站如何做推广方案千锋教育的真实性