Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

release 2.2.8 #523

Merged
merged 1 commit into from
Nov 20, 2023
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
8 changes: 8 additions & 0 deletions IDEA_CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
* 2.2.8

* feat: Add support for exporting APIs as .http files [(#522)](https://github.com/tangcent/easy-api/pull/522)

* feat: support search in several dialogs [(#521)](https://github.com/tangcent/easy-api/pull/521)

* Refactor: Preventing runtime.channel() from throwing exceptions on missing implementations [(#520)](https://github.com/tangcent/easy-api/pull/520)

* 2.2.7

* feat: Improve Layout and Responsiveness of Several UI Forms [#518](https://github.com/tangcent/easy-api/pull/#518)
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
plugin_name=EasyApi
plugin_version=2.2.7.212.0
plugin_version=2.2.8.212.0
kotlin.code.style=official
kotlin_version=1.8.0
junit_version=5.9.2
Expand Down
31 changes: 8 additions & 23 deletions idea-plugin/parts/pluginChanges.html
Original file line number Diff line number Diff line change
@@ -1,29 +1,14 @@
<a href="https://github.com/tangcent/easy-api/releases/tag/v2.2.7">v2.2.7(2023-11-12)</a><br>
<a href="https://github.com/tangcent/easy-api/releases/tag/v2.2.8">v2.2.8(2023-11-19)</a><br>
<a href="https://github.com/tangcent/easy-api/blob/master/IDEA_CHANGELOG.md">Full Changelog</a>

<ul>
<li style="list-style: none">enhancements:</li>
<li style="list-style: none">enhancements:</li>

<li>enhancements: feat: Improve Layout and Responsiveness of Several UI Forms (<a href="https://github.com/tangcent/easy-api/pull/518">#518</a>)</li>
<li>enhancements: feat: Add support for exporting APIs as .http files (<a
href="https://github.com/tangcent/easy-api/pull/522">#522</a>)
</li>

<li>enhancements: feat: Support configuring doc.source.disable to disable documentation reading (<a href="https://github.com/tangcent/easy-api/pull/517">#517</a>)</li>
<li>enhancements: feat: support search in several dialogs (<a href="https://github.com/tangcent/easy-api/pull/521">#521</a>)
</li>

<li>enhancements: feat: Add recommended configuration for Jackson JsonPropertyOrder (<a href="https://github.com/tangcent/easy-api/pull/516">#516</a>)</li>

<li>enhancements: feat: Add new rule field.order.with (<a href="https://github.com/tangcent/easy-api/pull/515">#515</a>)</li>

<li>enhancements: feat: add rules `postman.format.after` (<a href="https://github.com/tangcent/easy-api/pull/513">#513</a>)</li>

<li>enhancements: feat: Apply field rules to getter and setter methods (<a href="https://github.com/tangcent/easy-api/pull/512">#512</a>)</li>

</ul>

<ul>
<li style="list-style: none">fixes:</li>

<li>fixes: fix: fix issue with SessionStorage not works (<a href="https://github.com/tangcent/easy-api/pull/509">#509</a>)</li>

<li>fixes: fix: fix thread warning (<a href="https://github.com/tangcent/easy-api/pull/508">#508</a>)</li>

<li>fixes: fix: added support for strict check in jakarta.validation and javax.validation (<a href="https://github.com/tangcent/easy-api/pull/507">#507</a>)</li>
</ul>
</ul>
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ class HttpClientExporter {
val moduleFolderRequestMap = mutableMapOf<Pair<String, String>, MutableList<Request>>()

for (request in requests) {
val module = moduleHelper.findModule(request.resource!!) ?: "easy-yapi"
val module = moduleHelper.findModule(request.resource!!) ?: "easy-api"
val folder = formatFolderHelper.resolveFolder(request.resource!!).name ?: "apis"
val key = Pair(module, folder)
val requestList = moduleFolderRequestMap.getOrPut(key) { mutableListOf() }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -155,82 +155,82 @@ internal abstract class HttpClientProviderTest : AdvancedContextTest() {
val httpClient = httpClientProvider.getHttpClient()

//GET
httpClient.get().url("https://github.com/tangcent/easy-yapi/pulls").let {
assertEquals("https://github.com/tangcent/easy-yapi/pulls", it.url())
httpClient.get().url("https://github.com/tangcent/easy-api/pulls").let {
assertEquals("https://github.com/tangcent/easy-api/pulls", it.url())
assertEquals("GET", it.method())
}
httpClient.get("https://github.com/tangcent/easy-yapi/pulls").let {
assertEquals("https://github.com/tangcent/easy-yapi/pulls", it.url())
httpClient.get("https://github.com/tangcent/easy-api/pulls").let {
assertEquals("https://github.com/tangcent/easy-api/pulls", it.url())
assertEquals("GET", it.method())
}

//POST
httpClient.post().url("https://github.com/tangcent/easy-yapi/pulls").let {
assertEquals("https://github.com/tangcent/easy-yapi/pulls", it.url())
httpClient.post().url("https://github.com/tangcent/easy-api/pulls").let {
assertEquals("https://github.com/tangcent/easy-api/pulls", it.url())
assertEquals("POST", it.method())
}
httpClient.post("https://github.com/tangcent/easy-yapi/pulls").let {
assertEquals("https://github.com/tangcent/easy-yapi/pulls", it.url())
httpClient.post("https://github.com/tangcent/easy-api/pulls").let {
assertEquals("https://github.com/tangcent/easy-api/pulls", it.url())
assertEquals("POST", it.method())
}

//PUT
httpClient.put().url("https://github.com/tangcent/easy-yapi/pulls").let {
assertEquals("https://github.com/tangcent/easy-yapi/pulls", it.url())
httpClient.put().url("https://github.com/tangcent/easy-api/pulls").let {
assertEquals("https://github.com/tangcent/easy-api/pulls", it.url())
assertEquals("PUT", it.method())
}
httpClient.put("https://github.com/tangcent/easy-yapi/pulls").let {
assertEquals("https://github.com/tangcent/easy-yapi/pulls", it.url())
httpClient.put("https://github.com/tangcent/easy-api/pulls").let {
assertEquals("https://github.com/tangcent/easy-api/pulls", it.url())
assertEquals("PUT", it.method())
}

//DELETE
httpClient.delete().url("https://github.com/tangcent/easy-yapi/pulls").let {
assertEquals("https://github.com/tangcent/easy-yapi/pulls", it.url())
httpClient.delete().url("https://github.com/tangcent/easy-api/pulls").let {
assertEquals("https://github.com/tangcent/easy-api/pulls", it.url())
assertEquals("DELETE", it.method())
}
httpClient.delete("https://github.com/tangcent/easy-yapi/pulls").let {
assertEquals("https://github.com/tangcent/easy-yapi/pulls", it.url())
httpClient.delete("https://github.com/tangcent/easy-api/pulls").let {
assertEquals("https://github.com/tangcent/easy-api/pulls", it.url())
assertEquals("DELETE", it.method())
}

//OPTIONS
httpClient.options().url("https://github.com/tangcent/easy-yapi/pulls").let {
assertEquals("https://github.com/tangcent/easy-yapi/pulls", it.url())
httpClient.options().url("https://github.com/tangcent/easy-api/pulls").let {
assertEquals("https://github.com/tangcent/easy-api/pulls", it.url())
assertEquals("OPTIONS", it.method())
}
httpClient.options("https://github.com/tangcent/easy-yapi/pulls").let {
assertEquals("https://github.com/tangcent/easy-yapi/pulls", it.url())
httpClient.options("https://github.com/tangcent/easy-api/pulls").let {
assertEquals("https://github.com/tangcent/easy-api/pulls", it.url())
assertEquals("OPTIONS", it.method())
}

//TRACE
httpClient.trace().url("https://github.com/tangcent/easy-yapi/pulls").let {
assertEquals("https://github.com/tangcent/easy-yapi/pulls", it.url())
httpClient.trace().url("https://github.com/tangcent/easy-api/pulls").let {
assertEquals("https://github.com/tangcent/easy-api/pulls", it.url())
assertEquals("TRACE", it.method())
}
httpClient.trace("https://github.com/tangcent/easy-yapi/pulls").let {
assertEquals("https://github.com/tangcent/easy-yapi/pulls", it.url())
httpClient.trace("https://github.com/tangcent/easy-api/pulls").let {
assertEquals("https://github.com/tangcent/easy-api/pulls", it.url())
assertEquals("TRACE", it.method())
}

//PATCH
httpClient.patch().url("https://github.com/tangcent/easy-yapi/pulls").let {
assertEquals("https://github.com/tangcent/easy-yapi/pulls", it.url())
httpClient.patch().url("https://github.com/tangcent/easy-api/pulls").let {
assertEquals("https://github.com/tangcent/easy-api/pulls", it.url())
assertEquals("PATCH", it.method())
}
httpClient.patch("https://github.com/tangcent/easy-yapi/pulls").let {
assertEquals("https://github.com/tangcent/easy-yapi/pulls", it.url())
httpClient.patch("https://github.com/tangcent/easy-api/pulls").let {
assertEquals("https://github.com/tangcent/easy-api/pulls", it.url())
assertEquals("PATCH", it.method())
}

//HEAD
httpClient.head().url("https://github.com/tangcent/easy-yapi/pulls").let {
assertEquals("https://github.com/tangcent/easy-yapi/pulls", it.url())
httpClient.head().url("https://github.com/tangcent/easy-api/pulls").let {
assertEquals("https://github.com/tangcent/easy-api/pulls", it.url())
assertEquals("HEAD", it.method())
}
httpClient.head("https://github.com/tangcent/easy-yapi/pulls").let {
assertEquals("https://github.com/tangcent/easy-yapi/pulls", it.url())
httpClient.head("https://github.com/tangcent/easy-api/pulls").let {
assertEquals("https://github.com/tangcent/easy-api/pulls", it.url())
assertEquals("HEAD", it.method())
}

Expand Down
18 changes: 15 additions & 3 deletions plugin-script/release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,16 @@ echo "Last version: ${last_version}"
release_date=$(date +"%Y-%m-%d")

# Calculate the next version
next_version=$(echo ${last_version} | awk -F. '{split($0,a,".");a[3]++;printf("%d.%d.%d",a[1],a[2],a[3])}')
parts=(${last_version//./ })

if [[ ${parts[2]//[!0-9]/} == 9 ]]; then
parts[2]=0
parts[1]=$((parts[1] + 1))
else
parts[2]=$((parts[2] + 1))
fi

next_version="${parts[0]}.${parts[1]}.${parts[2]}"
echo "Next version: ${next_version}"

# Create a new release branch based on the next version
Expand All @@ -32,6 +41,9 @@ others=$(echo "${commits}" | grep -ivE "^feat|^fix" | sed 's/^/<li>/;s/$/<\/li>/
# Update the version number in the gradle.properties file
sed -i.bak "s/version=${last_version}/version=${next_version}/g" ${basedir}/gradle.properties && rm ${basedir}/gradle.properties.bak

# Update the version number in the plugin.xml
sed -i.bak "s/<version\>${last_version}/<version\>${next_version}/" ${basedir}/idea-plugin/src/main/resources/META-INF/plugin.xml && rm ${basedir}/idea-plugin/src/main/resources/META-INF/plugin.xml.bak

# Write the header to the pluginChanges.html file
echo "<a href=\"https://github.com/tangcent/easy-api/releases/tag/v${next_version}\">v${next_version}(${release_date})</a>" > ${basedir}/idea-plugin/parts/pluginChanges.html
echo "<br/>" >> ${basedir}/idea-plugin/parts/pluginChanges.html
Expand All @@ -56,14 +68,14 @@ fi
tidy -q -indent -wrap 0 --show-body-only yes ${basedir}/idea-plugin/parts/pluginChanges.html > ${basedir}/idea-plugin/parts/pluginChanges_temp.html
mv ${basedir}/idea-plugin/parts/pluginChanges_temp.html ${basedir}/idea-plugin/parts/pluginChanges.html

commits_for_changes_log=$(git log --pretty=format:"%s" v${last_version}..HEAD | sed -e 's/^\(.*\)(\(#[0-9]*\))$/\ * \1 \[\2\]\(https:\/\/github.com\/tangcent\/easy-api\/pull\/\2\)\n/')
commits_for_changes_log=$(git log --pretty=format:"%s" v${last_version}..HEAD | sed -e 's/^\(.*\)(#\([0-9]*\))$/\ * \1 \[\(#\2\)]\(https:\/\/github.com\/tangcent\/easy-api\/pull\/\2\)\n/')
echo "commits_for_changes_log:${commits_for_changes_log}"

echo "${commits_for_changes_log}" | cat - ${basedir}/IDEA_CHANGELOG.md > tmp && mv tmp ${basedir}/IDEA_CHANGELOG.md
echo "* ${next_version}" | cat - ${basedir}/IDEA_CHANGELOG.md > tmp && mv tmp ${basedir}/IDEA_CHANGELOG.md

# Add all changes and create a new commit
git add ${basedir}/gradle.properties ${basedir}/IDEA_CHANGELOG.md ${basedir}/idea-plugin/parts/pluginChanges.html
git add ${basedir}/gradle.properties ${basedir}/IDEA_CHANGELOG.md ${basedir}/idea-plugin/parts/pluginChanges.html ${basedir}/idea-plugin/src/main/resources/META-INF/plugin.xml

# Create a new commit with the list of commit messages
commit_message="release ${next_version}"
Expand Down
Loading