spaceship-prompt 4.3.3 → 4.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +7 -0
- package/package.json +1 -1
- package/sections/package.zsh +19 -1
- package/spaceship.zsh +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
# [4.4.0](https://github.com/spaceship-prompt/spaceship-prompt/compare/v4.3.3...v4.4.0) (2022-09-21)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Features
|
|
5
|
+
|
|
6
|
+
* make package section to support maven and gradle ([#1209](https://github.com/spaceship-prompt/spaceship-prompt/issues/1209)) ([c8b6ce7](https://github.com/spaceship-prompt/spaceship-prompt/commit/c8b6ce7ade1a3176353d6ba46faa37db7e05e709))
|
|
7
|
+
|
|
1
8
|
## [4.3.3](https://github.com/spaceship-prompt/spaceship-prompt/compare/v4.3.2...v4.3.3) (2022-09-21)
|
|
2
9
|
|
|
3
10
|
|
package/package.json
CHANGED
package/sections/package.zsh
CHANGED
|
@@ -22,7 +22,7 @@ SPACESHIP_PACKAGE_SYMBOL="${SPACESHIP_PACKAGE_SYMBOL="📦 "}"
|
|
|
22
22
|
SPACESHIP_PACKAGE_COLOR="${SPACESHIP_PACKAGE_COLOR="red"}"
|
|
23
23
|
|
|
24
24
|
if [ -z "$SPACESHIP_PACKAGE_ORDER" ]; then
|
|
25
|
-
SPACESHIP_PACKAGE_ORDER=(npm lerna cargo composer julia)
|
|
25
|
+
SPACESHIP_PACKAGE_ORDER=(npm lerna cargo composer julia maven gradle)
|
|
26
26
|
fi
|
|
27
27
|
|
|
28
28
|
# ------------------------------------------------------------------------------
|
|
@@ -89,6 +89,24 @@ spaceship_package::julia() {
|
|
|
89
89
|
spaceship::datafile --toml $project_toml "version"
|
|
90
90
|
}
|
|
91
91
|
|
|
92
|
+
spaceship_package::maven() {
|
|
93
|
+
|
|
94
|
+
spaceship::upsearch -s pom.xml || return
|
|
95
|
+
|
|
96
|
+
local maven_exe=$(spaceship::upsearch mvnw) || (spaceship::exists mvn && maven_exe="mvn") || return
|
|
97
|
+
|
|
98
|
+
$maven_exe help:evaluate -q -DforceStdout -D"expression=project.version" 2>/dev/null
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
spaceship_package::gradle() {
|
|
102
|
+
|
|
103
|
+
spaceship::upsearch -s settings.gradle settings.gradle.kts || return
|
|
104
|
+
|
|
105
|
+
local gradle_exe=$(spaceship::upsearch gradlew) || (spaceship::exists gradle && gradle_exe="gradle") || return
|
|
106
|
+
|
|
107
|
+
$gradle_exe properties --no-daemon --console=plain -q 2>/dev/null | grep "^version:" | awk '{printf $2}'
|
|
108
|
+
}
|
|
109
|
+
|
|
92
110
|
# ------------------------------------------------------------------------------
|
|
93
111
|
# Section
|
|
94
112
|
# ------------------------------------------------------------------------------
|