dotnet publish 命令,bash脚本如下(Windows安装git即可建议sh关联)

publish.sh

#!/usr/bin/env bash

# one line command:
# array=( win-x64 linux-x64 osx-x64 ); for i in "${array[@]}"; do printf "\n>>> building $i ...\n\n"; dotnet publish -r $i -c Release -p:PublishSingleFile=true; done set +x +e
# runtime array: https://docs.microsoft.com/en-us/dotnet/core/rid-catalog
array=( win-x64 linux-x64 osx-x64 )
config='Release'
# publish args: https://docs.microsoft.com/en-us/dotnet/core/tools/dotnet-publish
args=''
declare -i count=${#array[*]}
declare -i num=
printf '>>> \033[1;36mClean bin folder ...\033[0m\n\n'
find . -type d \( -iname 'bin' -o -iname 'obj' \) | xargs rm -rf
printf '\033[1;36mOK\033[0m\n'
for i in "${array[@]}"; do
printf "\n>>> \033[1;36m($num/$count) Building $i ...\033[0m\n\n"
dotnet publish -r $i -c $config -p:PublishSingleFile=true $args
if [ $? = ]; then
printf '\n\033[1;32m'SUCCESS'\033[0m\n'
else
printf '\n\033[1;31m'ERROR: $?'\033[0m\n'
fi
let num+=
done
printf "\n\033[1;36mAll done. 10s to exit ...\033[0m\n"
sleep 10s

dotnet 跨平台编译发布的更多相关文章

  1. dotnet core 跨平台编译发布

    vs2017 建立的项目,在项目目录 ,执行 dotnet publish -r ubuntu.15.04-x64 dotnet publish -r linux-x64 dotnet publish ...

  2. 皮裤原理和运营微信公众号dotNET跨平台

    经常碰到有同学对.NET跨平台存在各种疑惑和误解,原因是什么呢?当然我是知道.NET的跨平台不是问题,而且微软2014年的努力可圈可点,而且还有很多人对.NET的前景感到困惑.春节期间突然明白了,这就 ...

  3. .NET代码自动编译发布

    .NET代码自动编译发布   因本人一直使用.NET开发,在做项目的时候,每次都要涉及到各个环境的部署问题,手工操作容易出错,并且重复劳动多,所以一直在寻找一个能实现自动化部署的方案. 废话不多讲,先 ...

  4. .Net Core in Docker - 在容器内编译发布并运行

    Docker可以说是现在微服务,DevOps的基础,咱们.Net Core自然也得上Docker..Net Core发布到Docker容器的教程网上也有不少,但是今天还是想来写一写. 你搜.Net c ...

  5. 【dotnet跨平台】"dotnet restore"和"dotnet run"都做了些什么?

    [dotnet跨平台]"dotnet restore"和"dotnet run"都做了些什么? 前言: 关于dotnet跨平台的相关内容.能够參考:跨平台.NE ...

  6. 【dotnet跨平台】Asp.net 正在经历的变革

     [dotnet跨平台]Asp.net 正在经历的变革 Asp.net 正在经历一场变革.从官网:https://get.asp.net/ 我们能够看到多个版本号的字眼例如以下: ASP.NET ...

  7. DotNet跨平台 - docker部署.net core2.0项目

    参考文档: https://docs.docker.com/install/linux/docker-ce/centos/ http://www.dockerinfo.net/document htt ...

  8. dotnet跨平台 - 使用Nginx+Docker Compose运行.NETCore项目

    参考文档: https://docs.docker.com/install/linux/docker-ce/centos/ http://www.dockerinfo.net/document htt ...

  9. 如何将dotnet core webapi发布到docker中…

    如何将dotnet core webapi发布到docker中 今天想起来撸一下docker,中途还是遇到些问题,但是这些问题都是由于路径什么的导致不正确,在这儿还是记录下操作过程,今天是基于wind ...

随机推荐

  1. MySQL分组聚合group_concat + substr_index

    场景:给予一张商品售卖表,表中数据为商品的售卖记录,假设表中数据是定时脚本插入的,每个时间段的商品售卖数量不同,根据此表找各个商品的最多售卖数量的数据. 1.数据表 CREATE TABLE `goo ...

  2. http://research.google.com/archive/mapreduce.html

    http://research.google.com/archive/mapreduce.html

  3. Windows 下开启FTP服务并创建FTP用户

    Windows 下开启FTP服务,并创建用户 此教程教你怎么开启 Windows 的 FTP 服务,并创建用于登入 FTP 的用户.教程用到的操作系统是 Windows 7. 一.创建用于登入 FTP ...

  4. Bootstrap FileInput

    fileuploaded 事件 fileuploaded 事件是异步方法,如果在模态框中使用没上传完就释放模态框的内容会无法触发. $fileinput.on("fileuploaded&q ...

  5. mariadb(一)基础

    一.数据库介绍 1.什么是数据库? 简单的说,数据库就是一个存放数据的仓库,这个仓库是按照一定的数据结构(数据结构是指数据的组织形式或数据之间的联系)来组织,存储的,我们可以通过数据库提供的多种方法来 ...

  6. HTML --JS 选择框

    <html> <head> <title>选择框</title> <script language="JavaScript"& ...

  7. 【SD系列】SAP SD模块-创建供应商主数据BAPI

    公众号:SAP Technical 本文作者:matinal 原文出处:http://www.cnblogs.com/SAPmatinal/ 原文链接:[SD系列]SAP SD模块-创建供应商主数据B ...

  8. hdu6699Block Breaker

    Problem Description Given a rectangle frame of size n×m. Initially, the frame is strewn with n×m squ ...

  9. JPA Example查询

    //创建查询条件数据对象 Customer customer = new Customer(); customer.setAddress("河南省郑州市"); customer.s ...

  10. Python模块之pdfkit

    1.安装依赖 pip install python-docx #Python下的Microsoft Word 2007工具 pip install PyPDF2 #Python下的PDF工具 pip ...