GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — dropbox-sdk-java/scripts/diff-generated-sources at master · JavaScriptBach/dropbox-sdk-java

Expand file tree

/

diff-generated-sources

Copy path
More file actions
More file actions

Latest commit

 

History

History
History
executable file
·
59 lines (52 loc) · 1.76 KB
/

diff-generated-sources

Copy path

File metadata and controls

executable file
·
59 lines (52 loc) · 1.76 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
#!/usr/bin/env bash
# Exit immediately on any error.
set -euo pipefail
# Locate the script file. Cross symlinks if necessary.
loc="$0"
while [ -h "$loc" ]; do
ls=`ls -ld "$loc"`
link=`expr "$ls" : '.*-> \(.*\)$'`
if expr "$link" : '/.*' > /dev/null; then
loc="$link" # Absolute link
else
loc="`dirname "$loc"`/$link" # Relative link
fi
done
# Move to the location of the script
base_dir=`dirname "$loc"`
cd $base_dir
# Save the current branch name.
branch=`git rev-parse --abbrev-ref HEAD`
# Checkout master, update the suprepos and generate source files.
git checkout master
git submodule sync
git submodule update --init
./gradlew cleanGenerateBabelSources generateBabelSources
# Save these source files ia temp directory.
temp_dir="$(mktemp -d -t diff-generated-sources.XXXXXX)" # Weird usage, but works on Linux and Mac OS
function finish() {
[[ ! -e "$temp_dir" ]] || rm -r "$temp_dir"
}
trap finish EXIT
cp -r build/generated-sources/ $temp_dir
# Switch back to the original branch, update the suprepos and generate source files.
git checkout $branch
git submodule sync
git submodule update --init
./gradlew cleanGenerateBabelSources generateBabelSources
# Create the diff and open the page to submit to Phabricator.
# The diff command uses its return command to signal whether there was any
# difference, so we disable exiting on non-zero return codes for this command.
set +e
raw_diff=`diff -uNr ${temp_dir}/babel/ build/generated-sources/babel/`
diff_status=$?
set -e
if [ $diff_status -eq 1 ]; then
echo "$raw_diff" | grep -v "diff -uNr" | pbcopy
echo "Diff copied to the clipboard."
open "https://tails.corp.dropbox.com/differential/diff/create/"
elif [ $diff_status -eq 0 ]; then
>&2 echo "No difference found!"
else
exit $diff_status
fi
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.