Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 20 additions & 8 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@ name: Release

# Push a tag v<version> matching plugin.json to publish a GitHub Release.
# Lithe Store's tracker picks up stable releases and opens index pull requests.
# v0.1.0 is a trial release: publish it as a pre-release from the start; it
# needs a manually submitted Store entry. Keep the plain v<version> tag.
# Tags listed in PRERELEASE_TAGS below are published as pre-releases, which the
# tracker skips; they need a manually submitted Store entry. Keep the plain
# v<version> tag. docs/releases/<tag>.md, when present, lists the changes.
on:
push:
tags: ["v*"]
Expand All @@ -26,7 +27,7 @@ jobs:
java-version: |
8
17
# --expect-tag refuses LITHE_SDK_JAR and a lock without a released SDK.
# --expect-tag requires the tag to match plugin.json and both POM versions.
- name: Build the archive
run: |
set -o pipefail
Expand All @@ -40,23 +41,34 @@ jobs:
- name: Publish release
env:
GH_TOKEN: ${{ github.token }}
# v0.1.0 was a trial release. v0.1.2 needs a host offering
# litheLogging 1, which stable Lithe 0.6.7 lacks.
PRERELEASE_TAGS: v0.1.0 v0.1.2
run: |
prerelease=false
for tag in $PRERELEASE_TAGS; do
if [[ "$tag" == "$GITHUB_REF_NAME" ]]; then prerelease=true; fi
done
{
echo "兼容性:需要基于 Lithe preview、包含 buildSystems 插件接口及原生构建窗口支持的开发版;宿主支持 PR 合并前,请使用包含该改动的开发构建。"
echo "兼容性:需要提供结构化插件诊断(litheLogging 1)的 Lithe preview 开发版。稳定版 Lithe 0.6.7 没有 litheLogging 1,能安装但无法启动构建后端,请在稳定版上继续使用 0.1.1。"
echo
if [[ "$GITHUB_REF_NAME" == "v0.1.0" ]]; then
echo "v0.1.0 是预发布版本,Lithe Store 自动追踪会跳过;需要手工提交插件条目。"
if [[ -s "docs/releases/$GITHUB_REF_NAME.md" ]]; then
cat "docs/releases/$GITHUB_REF_NAME.md"
echo
fi
echo "安装:Lithe Store(https://github.com/Lithe-IDEA/Lithe-store)中的 Maven 条目合并后,才可在兼容开发版的 设置 → 插件 → 插件市场 中搜索 Maven 并安装。"
if [[ "$prerelease" == true ]]; then
echo "安装:预发布版本,Lithe Store 自动追踪会跳过,暂不收录 Store。下载下面的 ZIP,在 设置 → 插件 的 ⚙ 菜单中选择 从磁盘安装插件…。"
else
echo "安装:Lithe Store(https://github.com/Lithe-IDEA/Lithe-store)中的 Maven 条目合并后,可在 设置 → 插件 → 插件市场 中搜索 Maven 并安装。"
fi
echo
echo "SHA-256:"
echo '```'
sed 's#^dist/##' "$RUNNER_TEMP/checksums.txt"
echo '```'
} > "$RUNNER_TEMP/notes.md"
release_flags=()
if [[ "$GITHUB_REF_NAME" == "v0.1.0" ]]; then
if [[ "$prerelease" == true ]]; then
release_flags+=(--prerelease)
fi
gh release create "$GITHUB_REF_NAME" dist/*.zip --title "Maven $GITHUB_REF_NAME" --notes-file "$RUNNER_TEMP/notes.md" "${release_flags[@]}"
13 changes: 8 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
> Maven with a small bundled core extension that only reads the reactor, from a Java build provider that keeps the
> result in a snapshot, so reopening a project does not run Maven again until a POM or setting changes.

> **试用版**:0.1.0 作为预发布版本提供,需要基于 Lithe `preview`、包含 `buildSystems` 插件接口及原生构建窗口支持的开发版。宿主支持 PR 合并前,请使用包含该改动的开发构建。
> **预览版**:0.1.2 需要提供结构化插件诊断(`litheLogging: 1`)的 Lithe `preview` 开发版。稳定版 Lithe 0.6.7 没有 `litheLogging: 1`,能安装但无法启动构建后端,请继续使用 Lithe Store 中的 0.1.1。0.1.2 以预发布版本提供,暂不收录 Lithe Store。

## 功能

Expand Down Expand Up @@ -63,15 +63,17 @@ brew install maven

## 安装

Lithe Store 的 Maven 条目合并后,才可在上述兼容开发版中打开 **设置 → 插件 → 插件市场**,搜索 “Maven”,安装并按提示重启。
稳定版 Lithe 在 **设置 → 插件 → 插件市场** 中搜索 “Maven”,安装 0.1.1 并按提示重启。
0.1.2 预览版请从 [Releases](https://github.com/Lithe-IDEA/lithe-plugin-maven/releases) 下载 `maven-build-0.1.2-darwin.zip`,
在 **设置 → 插件** 的 ⚙ 菜单中选择 **从磁盘安装插件…**;Store 无法区分不提供 `litheLogging: 1` 的稳定版宿主,所以暂不收录。
Lithe 已预置 Lithe Store 社区插件源;如果你之前移除了它,先在 **⚙ → 管理插件仓库…** 中重新添加
`https://github.com/Lithe-IDEA/Lithe-store`。

一个包同时支持 Apple Silicon 和 Intel Mac;Lithe for Windows 支持插件市场后会增加 Windows 包。

## 诊断日志

本分支要求宿主提供 `litheLogging: 1`。SDK 通过类型化的 `lithe/log` 通知,把 Maven provider
0.1.2 起要求宿主提供 `litheLogging: 1`。SDK 通过类型化的 `lithe/log` 通知,把 Maven provider
操作交给宿主 v2 目录和统一 writer,写入当前会话的 `plugins/io.github.lithe-idea.maven-build/host` 通道。
关键成功终态为 INFO、失败终态为 ERROR,包含单调耗时和稳定分类;取消不记失败。
缓存保存失败或读取中项目变化属于可恢复降级,使用 WARN `degraded`,不记录异常正文、路径或环境值。
Expand Down Expand Up @@ -102,6 +104,7 @@ scripts/test.mjs # 用真实 Maven 经后端读取
scripts/test-backend.mjs # 用假 Maven 计数,检查快照命中、失效、刷新、合并运行和取消
.github/workflows/ci.yml # PR 时打包、用 Maven 3.6.3 和最新版测试,并用 Lithe Store 的规则检查
.github/workflows/release.yml # 推送 v<版本> 标签时发布 GitHub Release
docs/releases/v<版本>.md # 该版本的变化,发布时并入 Release 说明(可选)
```

本地需要 Node.js 22+、JDK(CI 用 17;扩展和后端都按 Java 8 编译,后端运行只需 Java 8)和 Maven(还需要 `zip`)。
Expand Down Expand Up @@ -168,8 +171,8 @@ node scripts/verify-scripts.mjs --host-bundle /Applications/Lithe.app
git tag v0.2.0 && git push origin v0.2.0
```

3. `Release` 工作流会核对标签与版本、打包、测试并发布 Release(说明里附 SHA-256)。首个 `v0.1.0` 会自动标为预发布版本,需要包含 `buildSystems` 接口的 Lithe 开发版。
4. Lithe Store 的自动追踪会发现稳定版本并开合并请求,合并后用户即可在 Lithe 中更新。自动追踪会跳过预发布版本;`v0.1.0` 需要在 Store 中手工提交条目,并使用已发布 ZIP 的实际 SHA-256。
3. `Release` 工作流会核对标签与版本、打包、测试并发布 Release(说明里附 SHA-256)。`release.yml` 里 `PRERELEASE_TAGS` 列出的版本(`v0.1.0` 试用版、需要 `litheLogging: 1` 的 `v0.1.2`)会标为预发布版本。
4. Lithe Store 的自动追踪会发现稳定版本并开合并请求,合并后用户即可在 Lithe 中更新。自动追踪会跳过预发布版本;需要收录时在 Store 中手工提交条目,并使用已发布 ZIP 的实际 SHA-256。

## 许可

Expand Down
2 changes: 1 addition & 1 deletion backend/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
<groupId>io.github.lithe-idea</groupId>
<artifactId>lithe-maven-backend</artifactId>
<!-- Kept equal to plugin.json's version; scripts/package.mjs checks it. -->
<version>0.1.1</version>
<version>0.1.2</version>
<packaging>jar</packaging>
<name>Lithe Maven build provider</name>

Expand Down
5 changes: 5 additions & 0 deletions docs/releases/v0.1.2.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
0.1.2 的变化:

- 构建后端接入 litheLogging 1:关键请求成功记 INFO、失败记 ERROR,带耗时和稳定分类,写入 Lithe 日志窗口的 `plugins/io.github.lithe-idea.maven-build/host` 通道;取消不记失败。
- 没有 `--state` 目录、快照保存失败、读取期间项目发生变化时各记一次 WARN `degraded`。Maven 失败只由 SDK 记录一次 ERROR,不再重复打印构建输出;源码、凭据、环境变量和构建输出不进入日志。
- 后端直接编译 `vendor/` 下官方 Java SDK 的源码(逐文件 SHA-256 校验),不再下载 SDK JAR;安装包附带 `SDK-LICENSE`。
2 changes: 1 addition & 1 deletion extension/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<groupId>io.github.lithe-idea</groupId>
<artifactId>lithe-maven-extension</artifactId>
<!-- Kept equal to plugin.json's version; scripts/package.mjs checks it. -->
<version>0.1.1</version>
<version>0.1.2</version>
<packaging>jar</packaging>
<name>Lithe Maven extension</name>

Expand Down
2 changes: 1 addition & 1 deletion io.github.lithe-idea.maven-build/plugin.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"schemaVersion": 2,
"id": "io.github.lithe-idea.maven-build",
"displayName": "Maven",
"version": "0.1.1",
"version": "0.1.2",
"pluginAPIVersion": 3,
"requires": { "buildProviders": 1, "buildSystems": 1, "serverProcess": 1 },
"vendor": {
Expand Down
Loading