mirror of
https://github.com/InsanusMokrassar/MicroUtils.git
synced 2026-11-10 22:12:59 +00:00
add publish_all_script
This commit is contained in:
1 parent
9acc69b897
commit
cf1c8f13db
2 files changed
+34
No files matched your search
@@ -30,3 +30,13 @@ allprojects {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
tasks.register("getPublishableModules") {
|
||||||
|
doLast {
|
||||||
|
rootProject.subprojects.each { project ->
|
||||||
|
if (project.plugins.hasPlugin('maven-publish')) {
|
||||||
|
println(":${project.name}")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
Executable
+24
@@ -0,0 +1,24 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
function send_notification() {
|
||||||
|
echo "$1"
|
||||||
|
}
|
||||||
|
|
||||||
|
function assert_success() {
|
||||||
|
"${@}"
|
||||||
|
local status=${?}
|
||||||
|
if [ ${status} -ne 0 ]; then
|
||||||
|
send_notification "### Error ${status} at: ${BASH_LINENO[*]} ###"
|
||||||
|
exit ${status}
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
readarray -t projects <<< "`./gradlew getPublishableModules --quiet`"
|
||||||
|
for project in "${projects[@]}"; do
|
||||||
|
echo "Start publishing of $project"
|
||||||
|
assert_success ./gradlew "$project:publishAllPublicationsToSonatypeRepository" --no-parallel --quiet
|
||||||
|
echo "Complete publishing of $project"
|
||||||
|
echo "Start uploading of $project"
|
||||||
|
assert_success ./gradlew uploadSonatypePublication --quiet
|
||||||
|
echo "Complete uploading of $project"
|
||||||
|
done
|
||||||
Reference in new issue
Block a user