#!/bin/bash -l
rm -rf qrcode*.jpg
yarn
yarn wxci type=$action appid=$appid version=$version desc=$desc buildId=${BUILD_ID}
#计算过期时间,并将过期时间写进自定义环境变量
#计算过期时间,并将过期时间写进自定义环境变量
now=`date '+%Y-%m-%d %H:%M'`
echo QRCode_Expires=`date -d "$now 25 minute" "+%Y-%m-%d %H:%M"` > wx-minipro-env.txt
pwd && ls
<div style="color:green;font-size:16px">二维码将于${QRCode_Expires}后过期</div> <div style="display: flex;justify-content: center;"> <img src="${JOB_URL}ws/qrcode-${BUILD_ID}.jpg" alt="预览二维码" width="200" height="200" /> </div> <div style="padding:5px 10px">构建分支----${branch}</div> <div style="padding:0 10px">企业AppID----${appid}</div>
标签:-%,ci,自定义,过期,微信,miniprogram,appid,Jenkins From: https://www.cnblogs.com/xkcp008/p/17657659.html