check-publishing
parent
3373f40185
commit
39b15ff8c0
|
@ -4,4 +4,5 @@
|
||||||
|
|
||||||
### Kaiten
|
### Kaiten
|
||||||
|
|
||||||
1. [Hotkey to add link (to JIRA, e.g.)](src/user-script/kaiten-insert-jira-link.tempermonkey.js)
|
1. [Hotkey to add link (to JIRA, e.g.)](src/user-script/kaiten-insert-jira-link.tempermonkey.js)
|
||||||
|
2. [Script for checking url availability until it done](src/check-url-until-200-ok/README.md)
|
||||||
|
|
|
@ -0,0 +1,11 @@
|
||||||
|
# URL checker
|
||||||
|
|
||||||
|
## About
|
||||||
|
|
||||||
|
This script was inspired by the neccesity of checking whether my new Maven artifact is published or not.
|
||||||
|
|
||||||
|
So, the intention is to check the Maven Central URL on its existence.
|
||||||
|
|
||||||
|
## Settings
|
||||||
|
|
||||||
|
Don't forget to set up it properly. It needs a `baseurl` variable to be set into `publishing.conf.sh`.
|
|
@ -0,0 +1,33 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
source publishing.conf.sh
|
||||||
|
|
||||||
|
program=$(basename $(pwd))
|
||||||
|
|
||||||
|
read -p "version to check > " version
|
||||||
|
echo "entered version = $version"
|
||||||
|
url="$baseurl/${version}/"
|
||||||
|
echo "checking $url"
|
||||||
|
|
||||||
|
check(){
|
||||||
|
echo $(curl -sL -w "%{http_code}\\n" "$url" -o /dev/null)
|
||||||
|
}
|
||||||
|
|
||||||
|
count=0
|
||||||
|
until [ $count -gt 1000 ] || [ "$(check)" == "200" ]
|
||||||
|
do
|
||||||
|
code=$(check)
|
||||||
|
echo "try $count - response $code"
|
||||||
|
ping -c 2 127.0.0.1 > /dev/null
|
||||||
|
count=$((count+1))
|
||||||
|
done
|
||||||
|
|
||||||
|
code=$(check)
|
||||||
|
if [ "$code" == "200" ]
|
||||||
|
then
|
||||||
|
echo "$code is 200"
|
||||||
|
notify-send -a MAVEN -t 5000 "$program" "version $version is published"
|
||||||
|
else
|
||||||
|
echo "$code is not 200"
|
||||||
|
notify-send -a MAVEN -u critical "$program" "failed to publish $version version"
|
||||||
|
fi
|
|
@ -0,0 +1,3 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
export baseurl="https://repo1.maven.org/maven2/me/bvn13/sdk/android/gpx/GpxAndroidSdk"
|
Loading…
Reference in New Issue