惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

F
Fortinet All Blogs
Recent Announcements
Recent Announcements
H
Help Net Security
Y
Y Combinator Blog
酷 壳 – CoolShell
酷 壳 – CoolShell
有赞技术团队
有赞技术团队
小众软件
小众软件
Last Week in AI
Last Week in AI
U
Unit 42
Google DeepMind News
Google DeepMind News
博客园 - 司徒正美
H
Hackread – Cybersecurity News, Data Breaches, AI and More
J
Java Code Geeks
Microsoft Security Blog
Microsoft Security Blog
G
Google Developers Blog
N
Netflix TechBlog - Medium
Blog — PlanetScale
Blog — PlanetScale
云风的 BLOG
云风的 BLOG
V
V2EX
博客园 - 聂微东
人人都是产品经理
人人都是产品经理
博客园 - 三生石上(FineUI控件)
阮一峰的网络日志
阮一峰的网络日志
爱范儿
爱范儿

WMI

How to Activate MySQL for Multiple Devices - WMI ESLint Flat Config for JS, TS, React, and Prettier - WMI Yarn NPM Registry Configuration - WMI Yarn Guides - WMI Set Up ADB Wireless Debugging on Android: A Full Guide - WMI How to Fill Tax Information on Google Adsense - WMI Migrate ESLint v9 for prettier typescript javascript - WMI PySide6 button click open new window - WMI PySide6 autocomplete input text - WMI Mobile Legends To The Stars Event Clue - WMI [PHP] generate random proxy IP:PORT from CIDR - WMI [PHP] generate big text file for testing purpose - WMI List of Chrome Driver command line arguments - WMI Happy eid mubarak - WMI Install markdown engine on vite ESM typescript - WMI Android Activity lifecycle - WMI OkHttp cookie handling on android (webview supported) - WMI enable automatic memory heap resizing of android studio - WMI is defining screen density can reduce build time ? - WMI
Turn git log history into markdown - WMI
Dimas Lanjaka · 2024-03-15 · via WMI
#!/bin/bash

echo "writing github commit history"

git log --pretty=format:"%ad%n%h %s%n%b" --date=format:"%Y-%m-%d %H:%M:%S" | while IFS= read -r line; do
  trimmed_line="${line#"${line%%[![:space:]]*}"}"
  trimmed_line="${trimmed_line%"${trimmed_line##*[![:space:]]}"}"

  if [ -n "$trimmed_line" ]; then
    if [[ "$trimmed_line" =~ ^[0-9]{4}-[0-9]{2}-[0-9]{2}\ [0-9]{2}:[0-9]{2}:[0-9]{2}$ ]]; then
      echo -e "**$trimmed_line**\n"
    elif [ "$first_line" = true ]; then
      first_line=false
    else
      echo -e "  $trimmed_line\n"
    fi
  fi
done > release-repo/changelog-commit.md

# Wait for 3 seconds
sleep 3

the format markdown like

**2024-03-07 18:41:29**

- 39d989ee chore: round double value

**2024-03-07 18:38:32**

- 0586bd98 chore: improve performance

above script also works with multiline commits, looks like below:

**2024-03-07 18:37:53**

- 064c3b79 chore: update preparation activity UI

  improve performance stability