Skip to content

Instantly share code, notes, and snippets.

@nseinlet
Created June 27, 2019 08:04
Show Gist options
  • Save nseinlet/678f7fd0f89b1a37dedf68bf9ee59009 to your computer and use it in GitHub Desktop.
Save nseinlet/678f7fd0f89b1a37dedf68bf9ee59009 to your computer and use it in GitHub Desktop.
#!/bin/sh
RED='\033[0;31m'
GREEN='\033[0;32m'
BLUE='\033[0;34m'
NC='\033[0m' # No Colo
REP1="odoo"
REP2="enterprise"
base_dir="/datas/src-migrations/diffs"
if [ -z "$2" ]
then
echo "No argument supplied"
echo "Usage = gen_diffs.sh old_ver new_ver"
echo "Ex : gen_diffs.sh saas-11.1 saas-11.2"
exit 1
fi
for repo in $REP1 $REP2
do
echo "${GREEN}update ${BLUE}${repo}${NC}"
cd /datas/progs/${repo} && git fetch --all
echo "${RED}diff ${BLUE}${repo}${NC}"
cd /datas/progs/${repo} && git diff --no-prefix origin/$1..origin/$2 -- $3 | filterdiff -X ~/filterdiff.patterns | diff2html -i stdin -F ${base_dir}/diff-$2-${repo}.html
done
echo "${GREEN}Finished.${NC}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment