-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy path.gitconfig
More file actions
230 lines (229 loc) · 16.1 KB
/
.gitconfig
File metadata and controls
230 lines (229 loc) · 16.1 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
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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
[push]
default = simple
[alias]
; ---------------------------------------------------------------------------
; Authenticator App: All droid* aliases that touch the authenticator/ repo are
; guarded by the same includeAuthenticatorApp property used by Gradle.
; The guard calls scripts/resolve-include-authenticator.sh which checks files
; in priority order (highest wins):
; 1. ~/.gradle/gradle.properties (per-user global)
; 2. gradle.properties (committed project default)
; 3. local.properties (per-checkout, gitignored — fallback only)
; This matches the priority used by settings.gradle and build.gradle.
; ---------------------------------------------------------------------------
hello = "!echo \"Hello World\""
droidShowBranches = "!f() { \
workDir=$(git config --get androidcomplete.workDir); \
printf '\n' ; printf '%s' "-----------------------------------------"; printf '%s' " "; \
printf '\n' ;cd $workDir/adal/; printf '\n' ; printf "${RED}ADAL${NC}"; printf '%s': " "; git branch --show-current; \
printf '\n' ;cd $workDir/msal/; printf '\n' ; printf "${RED}MSAL${NC}"; printf '%s': " "; git branch --show-current; \
printf '\n' ;cd $workDir/broker/; printf '\n' ; printf "${RED}BROKER${NC}"; printf '%s': " "; git branch --show-current; \
printf '\n' ;cd $workDir/common/; printf '\n' ; printf "${RED}COMMON${NC}"; printf '%s': " "; git branch --show-current; \
if $workDir/scripts/resolve-include-authenticator.sh $workDir; then printf '\n' ;cd $workDir/authenticator/; printf '\n' ; printf "${RED}AUTHENTICATOR${NC}"; printf '%s': " "; git branch --show-current; fi; \
printf '\n' ; printf '%s' "-----------------------------------------"; printf '%s' " "; \
}; f"
droidReplaceLine = "!f() { \
workDir=$(git config --get androidcomplete.workDir); \
seq 10 | sed -n '1,/[0-9]/p' \
}; f"
droidSetup = "!f() { \
git clone -b dev https://github.com/AzureAD/microsoft-authentication-library-for-android.git msal; \
git clone -b dev https://github.com/AzureAD/microsoft-authentication-library-common-for-android.git common; \
git clone -b dev https://github.com/AzureAD/azure-activedirectory-library-for-android.git adal; \
git clone -b dev https://github.com/identity-authnz-teams/ad-accounts-for-android.git broker; \
git clone -b master https://github.com/Azure-Samples/ms-identity-android-java.git azuresample; \
git clone -b main https://github.com/Azure-Samples/ms-identity-ciam-native-auth-android-sample.git nativeauthsample; \
git clone -b dev https://office.visualstudio.com/DefaultCollection/OneAuth/_git/OneAuth oneauth; \
git clone -b develop https://github.com/AzureAD/microsoft-authentication-library-for-cpp.git msalcpp; \
if scripts/resolve-include-authenticator.sh .; then git clone https://msazure.visualstudio.com/DefaultCollection/One/_git/AD-MFA-phonefactor-phoneApp-android authenticator || echo \"NOTE: Could not clone authenticator repo — skipping (optional).\"; fi; \
git clone -b dev https://IdentityDivision@dev.azure.com/IdentityDivision/DevEx/_git/AuthLibrariesApiReview design-docs; \
git clone -b main https://IdentityDivision@dev.azure.com/IdentityDivision/Engineering/_git/AuthClientAndroidPipelines 1ES-Pipelines; \
cd msal; git submodule init; git submodule update; cd ..; \
cd adal; git submodule init; git submodule update; cd ..; \
cd broker; git submodule init; git submodule update; cd ..; \
if [ -d authenticator ]; then cd authenticator; git submodule init; git submodule update; cd ..; fi; \
workDir=$(pwd); \
git config --replace-all androidcomplete.workDir $workDir; \
}; f"
droidSetupDevexOnly = "!f() { \
git clone -b dev https://github.com/AzureAD/microsoft-authentication-library-for-android.git msal; \
git clone -b dev https://github.com/AzureAD/microsoft-authentication-library-common-for-android.git common; \
git clone -b dev https://github.com/AzureAD/azure-activedirectory-library-for-android.git adal; \
git clone -b master https://github.com/Azure-Samples/ms-identity-android-java.git azuresample; \
git clone -b main https://github.com/Azure-Samples/ms-identity-ciam-native-auth-android-sample.git nativeauthsample; \
cd msal; git submodule init; git submodule update; cd ..; \
cd adal; git submodule init; git submodule update; cd ..; \
workDir=$(pwd); \
git config --replace-all androidcomplete.workDir $workDir; \
}; f"
droidUpdateCommon = "!f() { \
workDir=$(git config --get androidcomplete.workDir); \
cd $workDir; \
cd common; commonRevision=$(git rev-parse HEAD); cd ..;\
echo $commonRevision; \
cd $workDir/adal/common; git fetch origin; git checkout $commonRevision; \
cd $workDir/msal/common; git fetch origin; git checkout $commonRevision; \
cd $workDir/broker/common; git fetch origin; git checkout $commonRevision; \
}; f"
droidStatus = "!f() { \
RED='\\033[0;31m'; \
NC='\\033[0m'; \
workDir=$(git config --get androidcomplete.workDir); \
cd $workDir/adal/; printf "${RED}ADAL${NC}"; printf ": "; git fetch origin; git status; \
cd $workDir/msal/; printf "${RED}MSAL${NC}"; printf ": "; git fetch origin; git status; \
cd $workDir/broker/; printf "${RED}BROKER${NC}"; printf ": "; git fetch origin; git status; \
cd $workDir/common/; printf "${RED}COMMON${NC}"; printf ": "; git fetch origin; git status; \
cd $workDir/oneauth/; printf "${RED}ONEAUTH${NC}"; printf ": "; git fetch origin; git status; \
cd $workDir/msalcpp/; printf "${RED}MSALCPP${NC}"; printf ": "; git fetch origin; git status; \
if $workDir/scripts/resolve-include-authenticator.sh $workDir; then cd $workDir/authenticator/; printf "${RED}AUTHENTICATOR${NC}"; printf ": "; git fetch origin; git status; fi; \
cd $workDir/tsl/; printf "${RED}TSL${NC}"; printf ": "; git fetch origin; git status; \
cd $workDir/1ES-Pipelines/; printf "${RED}1ES-PIPELINES${NC}"; printf ": "; git fetch origin; git status; \
}; f"
droidNewFeature = "!f() { \
workDir=$(git config --get androidcomplete.workDir); \
cd $workDir/adal/; git checkout -b $1 dev; \
cd $workDir/msal/; git checkout -b $1 dev; \
cd $workDir/broker/; git checkout -b $1 dev; \
cd $workDir/common/; git checkout -b $1 dev; \
cd $workDir/msalcpp/; git checkout -b $1 develop; \
if $workDir/scripts/resolve-include-authenticator.sh $workDir; then cd $workDir/authenticator/; git checkout -b $1 working; fi; \
}; f"
droidCheckout = "!f() { \
workDir=$(git config --get androidcomplete.workDir); \
cd $workDir/adal/; git checkout $1; \
cd $workDir/msal/; git checkout $1; \
cd $workDir/broker/; git checkout $1; \
cd $workDir/common/; git checkout $1; \
cd $workDir/msalcpp/; git checkout $1; \
if $workDir/scripts/resolve-include-authenticator.sh $workDir; then cd $workDir/authenticator/; git checkout $1 || echo \"WARNING: Could not checkout '$1' in authenticator — branch may not exist.\"; fi; \
}; f"
droidPull = "!f() { \
workDir=$(git config --get androidcomplete.workDir); \
cd $workDir/adal/; git pull; \
cd $workDir/msal/; git pull; \
cd $workDir/broker/; git pull; \
cd $workDir/common/; git pull; \
cd $workDir/msalcpp/; git pull; \
cd $workDir/1ES-Pipelines/; git pull; \
if $workDir/scripts/resolve-include-authenticator.sh $workDir; then cd $workDir/authenticator/; git pull; fi; \
}; f"
droidPush = "!f() { \
workDir=$(git config --get androidcomplete.workDir); \
cd $workDir/adal/; git push -u origin HEAD; \
cd $workDir/msal/; git push -u origin HEAD; \
cd $workDir/broker/; git push -u origin HEAD; \
cd $workDir/common/; git push -u origin HEAD; \
cd $workDir/msalcpp/; git push -u origin HEAD || echo \"WARNING: Could not push to msalcpp — check remote access.\"; \
if $workDir/scripts/resolve-include-authenticator.sh $workDir; then cd $workDir/authenticator/; git push -u origin HEAD || echo \"WARNING: Could not push to authenticator — check remote access.\"; fi; \
}; f"
droidFetch = "!f() { \
RED='\\033[0;31m'; \
NC='\\033[0m'; \
workDir=$(git config --get androidcomplete.workDir); \
cd $workDir/adal/; printf \"${RED}ADAL${NC}: \"; git fetch origin; \
cd $workDir/msal/; printf \"${RED}MSAL${NC}: \"; git fetch origin; \
cd $workDir/broker/; printf \"${RED}BROKER${NC}: \"; git fetch origin; \
cd $workDir/common/; printf \"${RED}COMMON${NC}: \"; git fetch origin; \
cd $workDir/msalcpp/; printf \"${RED}MSALCPP${NC}: \"; git fetch origin; \
cd $workDir/oneauth/; printf \"${RED}ONEAUTH${NC}: \"; git fetch origin; \
if $workDir/scripts/resolve-include-authenticator.sh $workDir; then cd $workDir/authenticator/; printf \"${RED}AUTHENTICATOR${NC}: \"; git fetch origin; fi; \
}; f"
droidBranch = "!f() { \
RED='\\033[0;31m'; \
NC='\\033[0m'; \
workDir=$(git config --get androidcomplete.workDir); \
cd $workDir/; printf "${RED}ANDROID-COMPLETE${NC}"; printf '%s\n' ": "; git branch; \
cd $workDir/adal/; printf '\n' ; printf "${RED}ADAL${NC}"; printf '%s\n' ": "; git branch; \
cd $workDir/msal/; printf '\n' ; printf "${RED}MSAL${NC}"; printf '%s\n' ": "; git branch; \
cd $workDir/broker/; printf '\n' ; printf "${RED}BROKER${NC}"; printf '%s\n' ": "; git branch; \
cd $workDir/common/; printf '\n' ; printf "${RED}COMMON${NC}"; printf '%s\n' ": "; git branch; \
if $workDir/scripts/resolve-include-authenticator.sh $workDir; then cd $workDir/authenticator/; printf '\n' ; printf "${RED}AUTHENTICATOR${NC}"; printf '%s\n' ": "; git branch; fi; \
}; f"
droidStash = "!f() { \
workDir=$(git config --get androidcomplete.workDir); \
cd $workDir/adal/; git stash $1; \
cd $workDir/msal/; git stash $1; \
cd $workDir/broker/; git stash $1; \
cd $workDir/common/; git stash $1; \
cd $workDir/msalcpp/; git stash $1; \
if $workDir/scripts/resolve-include-authenticator.sh $workDir; then cd $workDir/authenticator/; git stash $1; fi; \
}; f"
droidUpdateVersionsGradle = "!f() { \
workDir=$(git config --get androidcomplete.workDir); \
git droidNewFeature android/update-versions-gradle; \
cp $workDir/gradle/versions.gradle $workDir/adal/gradle; \
cp $workDir/gradle.properties $workDir/adal; \
cp $workDir/gradle/wrapper/gradle-wrapper.properties $workDir/adal/gradle/wrapper; \
cp $workDir/gradle/versions.gradle $workDir/broker/gradle; \
cp $workDir/gradle.properties $workDir/broker; \
cp $workDir/gradle/wrapper/gradle-wrapper.properties $workDir/broker/gradle/wrapper; \
cp $workDir/gradle/versions.gradle $workDir/common/gradle; \
cp $workDir/gradle.properties $workDir/common; \
cp $workDir/gradle/wrapper/gradle-wrapper.properties $workDir/common/gradle/wrapper; \
cp $workDir/gradle/versions.gradle $workDir/msal/gradle; \
cp $workDir/gradle.properties $workDir/msal; \
cp $workDir/gradle/wrapper/gradle-wrapper.properties $workDir/msal/gradle/wrapper; \
cp $workDir/gradle/versions.gradle $workDir/msalcpp/source/android/msal/gradle; \
cp $workDir/gradle.properties $workDir/msalcpp/source/android/msal; \
cp $workDir/gradle/wrapper/gradle-wrapper.properties $workDir/msalcpp/source/android/msal/gradle/wrapper; \
}; f"
droidAssembleAllRootProjects = "!f() { \
workDir=$(git config --get androidcomplete.workDir); \
cd $workDir/adal; ./gradlew.bat assembleLocalDebug; \
cd $workDir/broker; ./gradlew.bat assembleLocalDebug; \
cd $workDir/common; ./gradlew.bat assembleDebug; \
cd $workDir/msal; ./gradlew.bat assembleLocalDebug; \
cd $workDir/msalcpp; py build.py --platform android --arch x64 --configuration debug; \
}; f"
;Usage git droidStartRelease <release_owner> <msal_version> <common_version> <broker_version> <adal_version>
;e.g. git droidStartRelease wainaina 1.0.0 2.0.0 3.0.0 4.0.0
;This will create the release_owner/release/version pipeline for the user.droidStartRelease
;Release branches on origin are non-editable and are better set as editable first then do the final
; release on the non editbale release branches.
droidStartRelease = "!f() { \
workDir=$(git config --get androidcomplete.workDir); \
printf '\n' ; printf '%s' "-----------------------------------------"; printf '%s' " "; \
printf '\n' ; printf '%s' "1. PREPARING WORK STATION FOR RELEASE"; printf '%s': " "; \
printf '\n' ; printf '%s' "-----------------------------------------"; printf '%s' " "; \
printf '\n' ;git droidStash; \
printf '\n' ;git droidCheckout dev; \
printf '\n' ;git droidUpdateCommon; \
printf '\n' ;git droidPull; \
printf '\n' ; printf '%s' "-----------------------------------------"; printf '%s' " "; \
printf '\n' ; printf '%s' "2. CUTTING and PUSHING BRANCHES"; printf '%s': " "; \
printf '\n' ; printf '%s' "-----------------------------------------"; printf '%s' " "; \
printf '\n' ; cd $workDir/msal/; git checkout -b release/$2 dev; \
printf '\n' ; git push -u origin release/$2; \
printf '\n' ; git checkout -b $1/release/$2 dev; \
printf '\n' ; git push -u origin $1/release/$2; \
printf '\n' ; cd $workDir/common/; git checkout -b release/$3 dev; \
printf '\n' ; git push -u origin release/$3; \
printf '\n' ; git checkout -b $1/release/$3 dev; \
printf '\n' ; git push -u origin $1/release/$3; \
printf '\n' ; cd $workDir/broker/; git checkout -b release/$4 dev; \
printf '\n' ; git push -u origin release/$4; \
printf '\n' ; git checkout -b $1/release/$4 dev; \
printf '\n' ; git push -u origin $1/release/$4; \
printf '\n' ; cd $workDir/adal/; git checkout -b release/$5 dev; \
printf '\n' ; git push -u origin release/$5; \
printf '\n' ; git checkout -b $1/release/$5 dev; \
printf '\n' ; git push -u origin $1/release/$5; \
printf '\n' ; printf '%s' "-----------------------------------------"; printf '%s' " "; \
printf '\n' ; printf '%s' "3. LIST OF GENERATED BRANCHES"; printf '%s': " "; \
printf '\n' ; cd $workDir/; git droidShowBranches; \
}; f"
droidCheckoutDev = "!f() { \
workDir=$(git config --get androidcomplete.workDir); \
cd $workDir/adal/; git checkout dev; git fetch; git pull; git submodule update; \
cd $workDir/msal/; git checkout dev; git fetch; git pull; git submodule update; \
cd $workDir/broker/; git checkout dev; git fetch; git pull; git submodule update; \
cd $workDir/common/; git checkout dev; git fetch; git pull; \
if $workDir/scripts/resolve-include-authenticator.sh $workDir; then cd $workDir/authenticator/; git checkout working; git fetch; git pull; git submodule update; fi; \
}; f"
droidUpdateSubmodules = "!f() { \
workDir=$(git config --get androidcomplete.workDir); \
cd $workDir/adal/; git submodule update; \
cd $workDir/msal/; git submodule update; \
cd $workDir/broker/; git submodule update; \
if $workDir/scripts/resolve-include-authenticator.sh $workDir; then cd $workDir/authenticator/; git submodule update; fi; \
}; f"