Skip to content

Commit

Permalink
add module name and execution time
Browse files Browse the repository at this point in the history
  • Loading branch information
bodo-hugo-barwich committed Oct 4, 2021
1 parent 0bdaa95 commit c7673d5
Showing 1 changed file with 31 additions and 1 deletion.
32 changes: 31 additions & 1 deletion bin/index-cpan.sh
Original file line number Diff line number Diff line change
@@ -1,10 +1,40 @@
#!/bin/sh

./bin/run bin/metacpan mapping --delete
MODULE=`basename $0`

NOW=$(date +"%F %T")
echo "${NOW} I ${MODULE}: Indices re-creating ..."

sdeletelog=`./bin/run bin/metacpan mapping --delete --yes 2>&1`
ideleters=$?

NOW=$(date +"%F %T")
echo "${NOW} I ${MODULE}: Re-creation finished with [$ideleters]"
echo "${NOW} I ${MODULE}: Re-creation Log:\n'$sdeletelog'"

if [ $ideleters -ne 0 ]; then
echo "${NOW} I ${MODULE}: Re-creation failed!"

exit $ideleters
fi

NOW=$(date +"%F %T")
echo "${NOW} I ${MODULE}: ElasticSearch 'elasticsearch:9200': Indices showing ..."

curl -v 'elasticsearch:9200/_cat/indices'

NOW=$(date +"%F %T")
echo "${NOW} I ${MODULE}: Packages downloading ..."

/bin/partial-cpan-mirror.sh

NOW=$(date +"%F %T")
echo "${NOW} I ${MODULE}: Indices rebuilding ..."

./bin/run bin/metacpan release /CPAN/authors/id/
./bin/run bin/metacpan latest
./bin/run bin/metacpan author
./bin/run bin/metacpan permission

NOW=$(date +"%F %T")
echo "${NOW} I ${MODULE}: done."

0 comments on commit c7673d5

Please sign in to comment.