forked from bushong1/dev-tools
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrelease-preview.sh
More file actions
executable file
·32 lines (25 loc) · 1.09 KB
/
Copy pathrelease-preview.sh
File metadata and controls
executable file
·32 lines (25 loc) · 1.09 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#!/usr/bin/env bash
# release-preview for center, hud, webtop, ozp-demo, ozp-rest, and (maybe) iwc
# assumes you have all repos cloned at REPO_DIR
REPO_DIR=~/ozp-repos
cd ${REPO_DIR}
## declare an array variable
declare -a repos=("ozp-center" "ozp-hud" "ozp-webtop" "ozp-rest" "ozp-react-commons" "ozp-iwc" "ozp-help" "ozp-iwc-owf7-widget-adapter" "ozp-demo")
## now loop through the above array
for i in "${repos[@]}"
do
printf "#################################################################\n"
printf "$i\n"
printf "#################################################################\n"
cd ${REPO_DIR}/$i
# update everything
git fetch --all --tags
git checkout master
git reset --hard origin/master
printf "*****************************************************************\n"
printf "Commits on master since last tag:\n"
printf "*****************************************************************\n"
git --no-pager log `git rev-list --tags --max-count=1`..origin/master
# or do whatever with individual element of the array
done
# You can access them using echo "${arr[0]}", "${arr[1]}" also