Changes between Initial Version and Version 1 of Ticket #17177, comment 51


Ignore:
Timestamp:
2021-05-17T23:43:54+02:00 (4 years ago)
Author:
taylor.smock

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #17177, comment 51

    initial v1  
    33Also, I'm running the following script to make certain I don't miss any of the plugins (note: I'm probably going to have to modify this):
    44{{{#!bash
    5 ant clean dist # Do this for r17862 and r17861, copy to a working directory
    6 cd ${WORKING_DIRECTORY}
    7 # Get the plugin list
    8 curl -O https://josm.openstreetmap.de/plugin
    9 # Get the plugin download URLs
    10 JOBS=(`cat plugin | grep -E "^.*.jar;" | awk -F';' '{print $2}'`)
    11 mkdir -p .cache
    12 # This just caches the plugins, so that a rerun doesn't get the plugins again
    13 for PLUGIN in $JOBS; do
     5#!/usr/bin/env bash
     6set -ex
     7
     8function get_plugins() {
     9  curl -O https://josm.openstreetmap.de/plugin
     10  # Get the plugin download URLs
     11  JOBS=(`cat plugin | grep -E "^.*.jar;" | awk -F';' '{print $2}'`)
     12  mkdir -p .cache
     13  # This just caches the plugins, so that a rerun doesn't get the plugins again
     14  for PLUGIN in $JOBS; do
    1415    echo $PLUGIN
    1516    PLUGIN_NAME="${PLUGIN##*/}"
    16     curl -z .cache/$PLUGIN_NAME --output .cache/$PLUGIN_NAME $PLUGIN
    17 done
    18 for i in .cache/*; do
     17    curl -Lz .cache/$PLUGIN_NAME --output .cache/$PLUGIN_NAME $PLUGIN
     18  done
     19}
     20
     21function get_josm() {
     22  # Check if already downloaded
     23  if [ -e ".cache/josm-r$1.jar" ]; then
     24    return
     25  fi
     26  if [[ $1 =~ "^[0-9]+$" ]]; then
     27      curl -Lz .cache/josm-r$1.jar --output .cache/josm-r$1.jar https://josm.openstreetmap.de/download/josm-snapshot-$1.jar
     28    if [[ ! -e ".cache/josm-r$1.jar" ]]; then
     29      curl -Lz .cache/josm-r$1.jar --output .cache/josm-r$1.jar https://josm.openstreetmap.de/download/Archiv/josm-snapshot-$1.jar
     30    fi
     31  else
     32    curl -Lz .cache/josm-$1.jar --output .cache/josm-$1.jar https://josm.openstreetmap.de/download/josm-$1.jar
     33  fi
     34}
     35
     36function run_checker() {
     37  get_josm $1
     38  get_josm $2
     39  for i in .cache/*; do
     40    while [ $(jobs | wc -l) -gt 4 ]; do
     41      sleep 10s
     42    done
    1943    NAME=${i#.cache/}
    20     docker run --name japi -v $(pwd):/app --rm tsmock77/japi-compliance-checker:latest japi-compliance-checker --lib=JOSM josm-r17861.jar --v1=17861 josm-r17862.jar --v2=17862 -client $i -report-path compat_reports/LIB_NAME/V1_to_V2/${NAME%.jar}
    21 done
     44    docker run -v $(pwd):/app --rm tsmock77/japi-compliance-checker:latest japi-compliance-checker --lib=JOSM .cache/josm-r$1.jar --v1=$1 .cache/josm-r$2.jar --v2=$2 -client $i -report-path compat_reports/JOSM/$1_to_$2/${NAME%.jar}.html &
     45  done
     46}
     47
     48function main() {
     49  get_plugins
     50  # Note: These were manually built and placed in `.cache`, as neither can be downloaded.
     51  run_checker 17861 17862
     52}
     53
     54main $@
    2255}}}