@situm/cordova 3.15.30 → 3.15.32
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.semgrepignore +8 -0
- package/azure-pipelines.yml +304 -303
- package/example/.editorconfig +1 -1
- package/example/ios/App/App.xcodeproj/project.pbxproj +2 -2
- package/example/package-lock.json +1 -1
- package/package.json +1 -1
- package/plugin.xml +5 -3
- package/src/android/app/src/main/java/es/situm/plugin/PluginHelper.java +75 -2
- package/src/android/app/src/main/java/es/situm/plugin/SitumMapper.java +1 -1
- package/src/android/app/src/main/java/es/situm/plugin/SitumPlugin.java +40 -4
- package/src/android/app/src/main/java/es/situm/plugin/TextToSpeechManager.java +117 -0
- package/src/ios/Podfile +2 -2
- package/src/ios/situmcordovaplugin/SITTextToSpeechManager.h +24 -0
- package/src/ios/situmcordovaplugin/SitTextToSpeechManager.m +68 -0
- package/src/ios/situmcordovaplugin/SitumPlugin.h +1 -0
- package/src/ios/situmcordovaplugin/SitumPlugin.m +57 -1
- package/www/map-view-controller.js +23 -12
- package/www/map-view.js +11 -9
- package/www/situm.js +8 -0
package/.semgrepignore
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
# Ignore generated JSDocs because the findings are related to a corner case:
|
|
2
|
+
# <!--[if lt IE 9]>
|
|
3
|
+
# <script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
|
|
4
|
+
# <![endif]-->
|
|
5
|
+
docs/JSDoc
|
|
6
|
+
|
|
7
|
+
# Ignore Cordova platform files that we cannot modify:
|
|
8
|
+
src/ios/cordova.js
|
package/azure-pipelines.yml
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
|
|
2
1
|
trigger:
|
|
3
2
|
- develop
|
|
4
3
|
- release/*
|
|
@@ -7,324 +6,326 @@ trigger:
|
|
|
7
6
|
pr: none
|
|
8
7
|
|
|
9
8
|
variables:
|
|
10
|
-
- group: Passwords
|
|
11
|
-
- group: SoftwareVersions
|
|
12
|
-
- group: ConfluencePages
|
|
13
|
-
- group: ChangelogIds
|
|
9
|
+
- group: Passwords
|
|
10
|
+
- group: SoftwareVersions
|
|
11
|
+
- group: ConfluencePages
|
|
12
|
+
- group: ChangelogIds
|
|
14
13
|
|
|
15
14
|
parameters:
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
15
|
+
- name: CordovaVersion
|
|
16
|
+
displayName: Plugin version (Only required for Release)
|
|
17
|
+
default: "0.0.0"
|
|
19
18
|
|
|
20
19
|
resources:
|
|
21
20
|
repositories:
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
21
|
+
- repository: sys_kubernetes_templates
|
|
22
|
+
type: bitbucket
|
|
23
|
+
endpoint: Bitbucket - sistemas
|
|
24
|
+
name: situm/sys-kubernetes-templates.git
|
|
25
|
+
ref: master
|
|
26
|
+
- repository: web_developers
|
|
27
|
+
type: bitbucket
|
|
28
|
+
endpoint: Bitbucket - sistemas
|
|
29
|
+
name: situm/web-developers.git
|
|
30
|
+
ref: master
|
|
31
|
+
- repository: cordova_sdk_validation
|
|
32
|
+
type: bitbucket
|
|
33
|
+
endpoint: Bitbucket - sistemas
|
|
34
|
+
name: situm/cordova-sdk-validation.git
|
|
35
|
+
ref: master
|
|
37
36
|
|
|
38
37
|
jobs:
|
|
39
|
-
- job:
|
|
40
|
-
pool:
|
|
41
|
-
vmImage: $(ubuntuVersion)
|
|
42
|
-
steps:
|
|
43
|
-
- template: azure/common-steps.yaml
|
|
44
|
-
- template: azure-templates/static-analyse.yml@sys_kubernetes_templates
|
|
45
|
-
parameters:
|
|
46
|
-
repoFolder: .
|
|
47
|
-
teams: mobile
|
|
48
|
-
|
|
49
|
-
- ${{ if or(contains(variables['Build.SourceBranch'], 'feature/'), contains(variables['Build.SourceBranch'],'develop'), ne(variables['Build.Reason'],'Manual')) }}:
|
|
50
|
-
- job: Test_iOS
|
|
38
|
+
- job: Static_Analyse
|
|
51
39
|
pool:
|
|
52
|
-
vmImage: $(
|
|
53
|
-
|
|
40
|
+
vmImage: $(ubuntuVersion)
|
|
54
41
|
steps:
|
|
55
|
-
|
|
42
|
+
- template: azure/common-steps.yaml
|
|
43
|
+
- template: azure-templates/static-analyse.yml@sys_kubernetes_templates
|
|
44
|
+
parameters:
|
|
45
|
+
repoFolder: .
|
|
46
|
+
teams: mobile
|
|
47
|
+
phase: semgrep
|
|
56
48
|
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
49
|
+
- template: azure-templates/static-analyse.yml@sys_kubernetes_templates
|
|
50
|
+
parameters:
|
|
51
|
+
repoFolder: .
|
|
52
|
+
teams: mobile
|
|
53
|
+
phase: trivy
|
|
60
54
|
|
|
61
|
-
|
|
62
|
-
|
|
55
|
+
- ${{ if or(contains(variables['Build.SourceBranch'], 'feature/'), contains(variables['Build.SourceBranch'],'develop'), ne(variables['Build.Reason'],'Manual')) }}:
|
|
56
|
+
- job: Test_iOS
|
|
57
|
+
pool:
|
|
58
|
+
vmImage: $(macOSVersion)
|
|
63
59
|
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
pod install
|
|
67
|
-
|
|
68
|
-
echo -e "\n[+] Execute xcode tests \n"
|
|
60
|
+
steps:
|
|
61
|
+
- template: azure/common-steps.yaml
|
|
69
62
|
|
|
70
|
-
|
|
63
|
+
- bash: |
|
|
64
|
+
echo -e "\n[+] Set xcode version to $(xcodeVersion)"
|
|
65
|
+
sudo xcode-select -switch $(xcodeVersion)
|
|
71
66
|
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
exit 1
|
|
75
|
-
fi
|
|
67
|
+
echo -e "\n[+] Copy JSON test files \n"
|
|
68
|
+
tests/scripts/copy_ios_resources.sh
|
|
76
69
|
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
- job: Test_Android
|
|
81
|
-
pool:
|
|
82
|
-
vmImage: $(ubuntuVersion)
|
|
70
|
+
echo -e "\n[+] Pod install \n"
|
|
71
|
+
cd src/ios
|
|
72
|
+
pod install
|
|
83
73
|
|
|
84
|
-
|
|
85
|
-
- task: JavaToolInstaller@0
|
|
86
|
-
inputs:
|
|
87
|
-
versionSpec: '11'
|
|
88
|
-
jdkArchitectureOption: 'x64'
|
|
89
|
-
jdkSourceOption: 'PreInstalled'
|
|
90
|
-
displayName: Install Java 11 for Gradle
|
|
74
|
+
echo -e "\n[+] Execute xcode tests \n"
|
|
91
75
|
|
|
92
|
-
|
|
93
|
-
- bash: |
|
|
94
|
-
echo -e "\n[+] Copy JSON test files \n"
|
|
95
|
-
tests/scripts/copy_android_resources.sh
|
|
96
|
-
|
|
97
|
-
echo -e "\n[+] Execute gradle tests \n"
|
|
98
|
-
cd src/android
|
|
99
|
-
./gradlew test --continue --info
|
|
100
|
-
|
|
101
|
-
if [ $? -ne 0 ];then
|
|
102
|
-
echo -e "\n [!] Error with tests....... \n"
|
|
103
|
-
exit 1
|
|
104
|
-
fi
|
|
105
|
-
|
|
106
|
-
displayName: Execute Test
|
|
107
|
-
|
|
108
|
-
- task: PublishTestResults@2
|
|
109
|
-
inputs:
|
|
110
|
-
testResultsFormat: 'JUnit'
|
|
111
|
-
testResultsFiles: 'src/android/app/build/test-results/*/*.xml'
|
|
112
|
-
displayName: Publish test
|
|
113
|
-
condition: always()
|
|
114
|
-
|
|
115
|
-
- job: Test_JS
|
|
116
|
-
pool:
|
|
117
|
-
vmImage: $(ubuntuVersion)
|
|
76
|
+
xcodebuild test -workspace SitumCordovaPlugin.xcworkspace -scheme CordovaLib -destination $(iosSimulator)
|
|
118
77
|
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
echo -e "\n[+] Install npm dependencies \n"
|
|
124
|
-
npm install
|
|
125
|
-
|
|
126
|
-
echo -e "\n[+] Execute npm tests \n"
|
|
127
|
-
npm test
|
|
128
|
-
displayName: JS Test
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
- ${{ if contains(variables['Build.SourceBranch'], 'release/') }}:
|
|
132
|
-
- job: Generate_Release
|
|
133
|
-
pool:
|
|
134
|
-
vmImage: $(ubuntuVersion)
|
|
135
|
-
steps:
|
|
136
|
-
- template: azure/common-steps.yaml
|
|
78
|
+
if [ $? -ne 0 ];then
|
|
79
|
+
echo -e "\n [!] Error with tests....... \n"
|
|
80
|
+
exit 1
|
|
81
|
+
fi
|
|
137
82
|
|
|
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
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
83
|
+
displayName: Execute Tests
|
|
84
|
+
|
|
85
|
+
- job: Test_Android
|
|
86
|
+
pool:
|
|
87
|
+
vmImage: $(ubuntuVersion)
|
|
88
|
+
|
|
89
|
+
steps:
|
|
90
|
+
- task: JavaToolInstaller@0
|
|
91
|
+
inputs:
|
|
92
|
+
versionSpec: "11"
|
|
93
|
+
jdkArchitectureOption: "x64"
|
|
94
|
+
jdkSourceOption: "PreInstalled"
|
|
95
|
+
displayName: Install Java 11 for Gradle
|
|
96
|
+
|
|
97
|
+
- template: azure/common-steps.yaml
|
|
98
|
+
- bash: |
|
|
99
|
+
echo -e "\n[+] Copy JSON test files \n"
|
|
100
|
+
tests/scripts/copy_android_resources.sh
|
|
101
|
+
|
|
102
|
+
echo -e "\n[+] Execute gradle tests \n"
|
|
103
|
+
cd src/android
|
|
104
|
+
./gradlew test --continue --info
|
|
105
|
+
|
|
106
|
+
if [ $? -ne 0 ];then
|
|
107
|
+
echo -e "\n [!] Error with tests....... \n"
|
|
108
|
+
exit 1
|
|
109
|
+
fi
|
|
110
|
+
|
|
111
|
+
displayName: Execute Test
|
|
112
|
+
|
|
113
|
+
- task: PublishTestResults@2
|
|
114
|
+
inputs:
|
|
115
|
+
testResultsFormat: "JUnit"
|
|
116
|
+
testResultsFiles: "src/android/app/build/test-results/*/*.xml"
|
|
117
|
+
displayName: Publish test
|
|
118
|
+
condition: always()
|
|
119
|
+
|
|
120
|
+
- job: Test_JS
|
|
121
|
+
pool:
|
|
122
|
+
vmImage: $(ubuntuVersion)
|
|
123
|
+
|
|
124
|
+
steps:
|
|
125
|
+
- bash: |
|
|
126
|
+
cd cordova
|
|
127
|
+
|
|
128
|
+
echo -e "\n[+] Install npm dependencies \n"
|
|
129
|
+
npm install
|
|
130
|
+
|
|
131
|
+
echo -e "\n[+] Execute npm tests \n"
|
|
132
|
+
npm test
|
|
133
|
+
displayName: JS Test
|
|
134
|
+
|
|
135
|
+
- ${{ if contains(variables['Build.SourceBranch'], 'release/') }}:
|
|
136
|
+
- job: Generate_Release
|
|
137
|
+
pool:
|
|
138
|
+
vmImage: $(ubuntuVersion)
|
|
139
|
+
steps:
|
|
140
|
+
- template: azure/common-steps.yaml
|
|
141
|
+
|
|
142
|
+
- task: NodeTool@0
|
|
143
|
+
inputs:
|
|
144
|
+
versionSource: "spec"
|
|
145
|
+
versionSpec: $(nodeVersion)
|
|
146
|
+
|
|
147
|
+
- ${{ if eq(variables['Build.Reason'],'manual') }}:
|
|
148
|
+
- bash: |
|
|
149
|
+
if [[ "${{ parameters.CordovaVersion }}" == "0.0.0" ]];then
|
|
150
|
+
echo -e "\n[!] IMPORTANT: You don't set the plugin version when you run the release branch and I'm not fortune teller\n"
|
|
151
|
+
exit 1
|
|
152
|
+
else
|
|
153
|
+
echo "##vso[task.setvariable variable=version]$(echo ${{ parameters.CordovaVersion }})"
|
|
154
|
+
echo -e "\n[+] I'm a shy step so I don't tell you anything\n"
|
|
155
|
+
fi
|
|
156
|
+
|
|
157
|
+
displayName: Set Cordova Version Manual
|
|
158
|
+
|
|
159
|
+
- ${{ if ne(variables['Build.Reason'],'manual') }}:
|
|
160
|
+
- bash: |
|
|
161
|
+
CordovaVersion=$(echo $(Build.SourceBranch) | cut -d "/" -f 4)
|
|
162
|
+
echo "##vso[task.setvariable variable=version]$(echo $CordovaVersion)"
|
|
163
|
+
echo -e "\n[+] I'm a shy step that only executes where this pipeline run automatic\n"
|
|
164
|
+
displayName: Set Cordova Version Automatic
|
|
165
|
+
|
|
166
|
+
- bash: |
|
|
167
|
+
|
|
168
|
+
echo -e "\n[+] Installing NPM version $(npmVersion)\n"
|
|
169
|
+
npm install -g $(npmVersion)
|
|
170
|
+
|
|
171
|
+
currentBranch=$(echo $(Build.SourceBranch) | cut -d "/" -f 3,4)
|
|
172
|
+
echo "##vso[task.setvariable variable=currentBranch]$(echo $currentBranch)"
|
|
173
|
+
|
|
174
|
+
echo -e "\n[+] Variables:"
|
|
175
|
+
echo -e "\t[+] Plugin version: $(version)"
|
|
176
|
+
echo -e "\t[+] NPM CLI version: $(npm --version)"
|
|
177
|
+
echo -e "\t[+] Current branch: $currentBranch"
|
|
178
|
+
|
|
179
|
+
echo -e "\n[+] Setting git remote credentials\n"
|
|
180
|
+
if [ -d "cordova" ];then
|
|
181
|
+
cd cordova
|
|
182
|
+
fi
|
|
183
|
+
git remote set-url origin https://situmops:$(github_token)@github.com/$(Build.Repository.Name).git
|
|
184
|
+
cat .git/config
|
|
185
|
+
|
|
186
|
+
displayName: Initial Vars & Configs
|
|
187
|
+
|
|
188
|
+
- bash: |
|
|
189
|
+
|
|
190
|
+
cd cordova
|
|
191
|
+
echo -e "\n[+] Setting NPM version to $(version)"
|
|
192
|
+
npm version $(version) --no-git-tag-version
|
|
193
|
+
|
|
194
|
+
echo -e "\n[+] Change plugin version in plugin.xml"
|
|
195
|
+
sed -i "s/version=\".*\">/version=\"$(version)\">/g" plugin.xml
|
|
196
|
+
|
|
197
|
+
echo -e "\n[+] Setting git to push NPM version\n"
|
|
198
|
+
git config --global user.email "sistemas@situm.es"
|
|
199
|
+
git config --global user.name "Situmops"
|
|
200
|
+
|
|
201
|
+
echo -e "\n[+] Fetch branches \n"
|
|
202
|
+
git fetch
|
|
203
|
+
|
|
204
|
+
echo -e "\n[+] Changing to $(currentBranch)"
|
|
205
|
+
git checkout $(currentBranch)
|
|
206
|
+
|
|
207
|
+
echo -e "\n[+] Add,Commit and Push to $(currentBranch)"
|
|
208
|
+
git commit -am "[skip ci] Setting the Cordova version to $(version)"
|
|
209
|
+
git push --set-upstream origin $(currentBranch)
|
|
210
|
+
git push
|
|
211
|
+
displayName: Make changes
|
|
212
|
+
|
|
213
|
+
- template: azure-templates/publish_release.yml@sys_kubernetes_templates
|
|
214
|
+
parameters:
|
|
215
|
+
bitbucket:
|
|
216
|
+
bitbucket_user: situmops
|
|
217
|
+
system: "N/A"
|
|
218
|
+
server: "github"
|
|
219
|
+
repoFolder: "cordova"
|
|
220
|
+
mergeBranches:
|
|
221
|
+
- "master"
|
|
222
|
+
- "develop"
|
|
223
|
+
|
|
224
|
+
- bash: |
|
|
225
|
+
cd cordova
|
|
226
|
+
echo -e "\n[+] Fetch all branches\n"
|
|
227
|
+
git fetch
|
|
228
|
+
|
|
229
|
+
echo -e "\n[+] Checkout and Pull to master branch\n"
|
|
230
|
+
git checkout master
|
|
231
|
+
git pull origin master
|
|
232
|
+
|
|
233
|
+
echo -e "\n[+] Configure NPM login"
|
|
234
|
+
echo "//registry.npmjs.org/:_authToken=$(NPM_TOKEN)" > ~/.npmrc
|
|
235
|
+
|
|
236
|
+
echo -e "\n[+] Publish NPM packages"
|
|
237
|
+
npm publish --access=public
|
|
238
|
+
|
|
239
|
+
displayName: NPM publish
|
|
240
|
+
|
|
241
|
+
- bash: |
|
|
242
|
+
cd cordova
|
|
243
|
+
|
|
244
|
+
echo -e "\n[+] Install dependencies"
|
|
245
|
+
npm install
|
|
246
|
+
|
|
247
|
+
echo -e "\n[+] Generate Documentation\n"
|
|
248
|
+
npm run jsdoc
|
|
249
|
+
|
|
250
|
+
displayName: Generate JSDoc
|
|
251
|
+
|
|
252
|
+
- template: azure-templates/commit-doc.yaml@sys_kubernetes_templates
|
|
253
|
+
parameters:
|
|
254
|
+
version: $(version)
|
|
255
|
+
docPath: cordova/docs/JSDoc
|
|
256
|
+
system: cordova
|
|
257
|
+
bitbucket:
|
|
258
|
+
bitbucket_user: $(bitbucket_user)
|
|
259
|
+
bitbucket_pass: $(bitbucket_pass)
|
|
260
|
+
release: "cordova"
|
|
261
|
+
|
|
262
|
+
- bash: |
|
|
263
|
+
if [ -d "cordova" ]; then
|
|
264
|
+
cd cordova
|
|
265
|
+
fi
|
|
266
|
+
|
|
267
|
+
echo -e "\n[+] Pull master changes and change to master branch \n"
|
|
268
|
+
git fetch
|
|
269
|
+
git checkout master
|
|
270
|
+
git pull origin master
|
|
271
|
+
|
|
272
|
+
iossdk=$(grep -oP 'spec="\~> \K[0-9]+\.[0-9]+\.[0-9]+' plugin.xml)
|
|
273
|
+
androidsdk=$(grep -oE 'es.situm:situm-sdk:[0-9]+\.[0-9]+\.[0-9]+@aar' src/android/situm.gradle | awk -F'[:@]' '{print $3}')
|
|
274
|
+
|
|
275
|
+
|
|
276
|
+
echo -e "\n[+] Checkout to previous commit\n"
|
|
277
|
+
git stash
|
|
278
|
+
git checkout HEAD~1
|
|
279
|
+
|
|
280
|
+
iossdk_old=$(grep -oP 'spec="\~> \K[0-9]+\.[0-9]+\.[0-9]+' plugin.xml)
|
|
281
|
+
androidsdk_old=$(grep -oE 'es.situm:situm-sdk:[0-9]+\.[0-9]+\.[0-9]+@aar' src/android/situm.gradle | awk -F'[:@]' '{print $3}')
|
|
282
|
+
|
|
283
|
+
echo -e "\n[+] Return repository to master branch\n"
|
|
284
|
+
git checkout master
|
|
285
|
+
|
|
286
|
+
echo -e "\n[+] Versions:"
|
|
287
|
+
echo -e "\t[+] Cordova SDK: $(version)"
|
|
288
|
+
echo -e "\t[+] ANDROID SDK: $androidsdk"
|
|
289
|
+
echo -e "\t[+] IOS SDK: $iossdk"
|
|
290
|
+
echo -e "\t[+] ANDROID SDK (OLD VERSION): $androidsdk_old"
|
|
291
|
+
echo -e "\t[+] IOS SDK (OLD IOS): $iossdk_old"
|
|
292
|
+
|
|
293
|
+
versions="| *VERSIÓN* | *FECHA* | *ANDROID SDK* | *IOS SDK* |\n|$(version)|$(date +"%d/%m/%Y")|"
|
|
294
|
+
|
|
295
|
+
if [ "$androidsdk" != "$androidsdk_old" ];then
|
|
296
|
+
versions="$versions *$androidsdk* |"
|
|
297
|
+
android_changelog_version=$androidsdk
|
|
298
|
+
else
|
|
299
|
+
android_changelog_version="0.0.0"
|
|
300
|
+
versions="$versions $androidsdk|"
|
|
301
|
+
fi
|
|
302
|
+
|
|
303
|
+
if [ "$iossdk" != "$iossdk_old" ];then
|
|
304
|
+
versions="$versions *$iossdk*|"
|
|
305
|
+
ios_changelog_version=$iossdk
|
|
306
|
+
else
|
|
307
|
+
ios_changelog_version="0.0.0"
|
|
308
|
+
versions="$versions $iossdk|"
|
|
309
|
+
fi
|
|
310
|
+
|
|
311
|
+
echo "##vso[task.setvariable variable=versions]$(echo $versions)"
|
|
312
|
+
echo "##vso[task.setvariable variable=android_changelog_version]$(echo $android_changelog_version)"
|
|
313
|
+
echo "##vso[task.setvariable variable=ios_changelog_version]$(echo $ios_changelog_version)"
|
|
314
|
+
|
|
315
|
+
displayName: Get Versions
|
|
316
|
+
|
|
317
|
+
- template: azure-templates/publish-changelog.yaml@sys_kubernetes_templates
|
|
318
|
+
parameters:
|
|
319
|
+
changelogId: $(Cordova_Changelog_id)
|
|
320
|
+
android_changelog_version: $(android_changelog_version)
|
|
321
|
+
ios_changelog_version: $(ios_changelog_version)
|
|
322
|
+
|
|
323
|
+
- template: azure-templates/release-table.yaml@sys_kubernetes_templates
|
|
324
|
+
parameters:
|
|
325
|
+
versions: $(versions)
|
|
326
|
+
releaseTable: CORDOVA_SDK_TABLE
|
|
327
|
+
confluence_release_page: $(CORDOVA_SDK_TABLE)
|
|
328
|
+
confluence_release_page_title: "SDK Automatic Release Table - Cordova Plugin"
|
|
329
|
+
bitbucket:
|
|
330
|
+
bitbucket_user: $(bitbucket_user)
|
|
331
|
+
bitbucket_pass: $(bitbucket_pass)
|