├── README.md ├── manifest-BETA.json ├── manifest.json └── nightlyRelease.sh /README.md: -------------------------------------------------------------------------------- 1 | # obsidian-components-release 2 | 3 | Obsidian missing components 4 | -------------------------------------------------------------------------------- /manifest-BETA.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": "components", 3 | "name": "Components", 4 | "version": "2.4.250528", 5 | "minAppVersion": "0.14.0", 6 | "description": "create component for your obsidian", 7 | "author": "vran", 8 | "authorUrl": "https://github.com/vran-dev", 9 | "isDesktopOnly": false, 10 | "fundingUrl": "https://www.buymeacoffee.com/vran" 11 | } 12 | -------------------------------------------------------------------------------- /manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": "components", 3 | "name": "Components", 4 | "version": "2.4.0", 5 | "minAppVersion": "0.14.0", 6 | "description": "create component for your obsidian", 7 | "author": "vran", 8 | "authorUrl": "https://github.com/vran-dev", 9 | "isDesktopOnly": false, 10 | "fundingUrl": "https://www.buymeacoffee.com/vran" 11 | } 12 | -------------------------------------------------------------------------------- /nightlyRelease.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # 1. 读取 manifest.json 文件,获取 version 字段的值 4 | version=$(awk -F'"' '/"version":/ {print $4}' manifest.json) 5 | 6 | # 2. 取第一部分和第二部分 7 | # 使用 awk 提取前两部分,确保正确处理 2.10.x 这样的版本号 8 | major_minor=$(echo $version | awk -F'.' '{print $1 "." $2}') 9 | 10 | # 3. 获取当前日期,生成 yyMMdd 格式 11 | current_date=$(date +%y%m%d) 12 | 13 | # 4. 结合第二步获取到的内容拼接,得到新的 tag 名 14 | new_version="${major_minor}.${current_date}" 15 | 16 | # 更新 manifest.json 中的 version 字段 17 | sed -i "" -E "s/\"version\": \".*\..*\..*\"/\"version\": \"$new_version\"/" manifest-BETA.json 18 | 19 | 20 | # 5. 执行 git 21 | git add . 22 | git commit -m "Release $new_version" 23 | git push 24 | git tag $new_version 25 | git push --tags 26 | 27 | echo "New tag $new_version created and pushed." --------------------------------------------------------------------------------