Ver código fonte

fix(misc) drop unused files from the project

factor2
Saúl Ibarra Corretgé 1 ano atrás
pai
commit
03b3cd4778
8 arquivos alterados com 0 adições e 397 exclusões
  1. 0
    6
      .buckconfig
  2. 0
    6
      .travis.yml
  3. 0
    1
      Makefile
  4. 0
    163
      analytics-ga.js
  5. 0
    0
      eslint
  6. 0
    18
      ios/ci/build-ipa.plist.template
  7. 0
    103
      ios/ci/build-ipa.sh
  8. 0
    100
      ios/ci/setup-certificates.sh

+ 0
- 6
.buckconfig Ver arquivo

@@ -1,6 +0,0 @@
1
-
2
-[android]
3
-  target = Google Inc.:Google APIs:23
4
-
5
-[maven_repositories]
6
-  central = https://repo1.maven.org/maven2

+ 0
- 6
.travis.yml Ver arquivo

@@ -1,6 +0,0 @@
1
-osx_image: xcode11.1
2
-language: objective-c
3
-script:
4
-- "./ios/travis-ci/build-ipa.sh"
5
-after_script:
6
-  - sleep 10

+ 0
- 1
Makefile Ver arquivo

@@ -48,7 +48,6 @@ deploy-appbundle:
48 48
 		$(BUILD_DIR)/external_api.min.js.map \
49 49
 		$(BUILD_DIR)/alwaysontop.min.js \
50 50
 		$(BUILD_DIR)/alwaysontop.min.js.map \
51
-		$(OUTPUT_DIR)/analytics-ga.js \
52 51
 		$(BUILD_DIR)/analytics-ga.min.js \
53 52
 		$(BUILD_DIR)/analytics-ga.min.js.map \
54 53
 		$(BUILD_DIR)/face-landmarks-worker.min.js \

+ 0
- 163
analytics-ga.js Ver arquivo

@@ -1,163 +0,0 @@
1
-/* global ga */
2
-
3
-(function(ctx) {
4
-    /**
5
-     *
6
-     */
7
-    function Analytics(options) {
8
-        /* eslint-disable */
9
-
10
-        if (!options.googleAnalyticsTrackingId) {
11
-            console.log(
12
-                'Failed to initialize Google Analytics handler, no tracking ID');
13
-             return;
14
-        }
15
-
16
-        /**
17
-         * Google Analytics
18
-         * TODO: Keep this local, there's no need to add it to window.
19
-         */
20
-        (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
21
-            (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
22
-        })(window,document,'script','//www.google-analytics.com/analytics.js','ga');
23
-        ga('create', options.googleAnalyticsTrackingId, 'auto');
24
-        ga('send', 'pageview');
25
-
26
-        /* eslint-enable */
27
-    }
28
-
29
-    /**
30
-     * Extracts the integer to use for a Google Analytics event's value field
31
-     * from a lib-jitsi-meet analytics event.
32
-     * @param {Object} event - The lib-jitsi-meet analytics event.
33
-     * @returns {Object} - The integer to use for the 'value' of a Google
34
-     * Analytics event.
35
-     * @private
36
-     */
37
-    Analytics.prototype._extractAction = function(event) {
38
-        // Page events have a single 'name' field.
39
-        if (event.type === 'page') {
40
-            return event.name;
41
-        }
42
-
43
-        // All other events have action, actionSubject, and source fields. All
44
-        // three fields are required, and the often jitsi-meet and
45
-        // lib-jitsi-meet use the same value when separate values are not
46
-        // necessary (i.e. event.action == event.actionSubject).
47
-        // Here we concatenate these three fields, but avoid adding the same
48
-        // value twice, because it would only make the GA event's action harder
49
-        // to read.
50
-        let action = event.action;
51
-
52
-        if (event.actionSubject && event.actionSubject !== event.action) {
53
-            // Intentionally use string concatenation as analytics needs to
54
-            // work on IE but this file does not go through babel. For some
55
-            // reason disabling this globally for the file does not have an
56
-            // effect.
57
-            // eslint-disable-next-line prefer-template
58
-            action = event.actionSubject + '.' + action;
59
-        }
60
-        if (event.source && event.source !== event.action
61
-                && event.source !== event.action) {
62
-            // eslint-disable-next-line prefer-template
63
-            action = event.source + '.' + action;
64
-        }
65
-
66
-        return action;
67
-    };
68
-
69
-    /**
70
-     * Extracts the integer to use for a Google Analytics event's value field
71
-     * from a lib-jitsi-meet analytics event.
72
-     * @param {Object} event - The lib-jitsi-meet analytics event.
73
-     * @returns {Object} - The integer to use for the 'value' of a Google
74
-     * Analytics event, or NaN if the lib-jitsi-meet event doesn't contain a
75
-     * suitable value.
76
-     * @private
77
-     */
78
-    Analytics.prototype._extractValue = function(event) {
79
-        let value = event && event.attributes && event.attributes.value;
80
-
81
-        // Try to extract an integer from the "value" attribute.
82
-        value = Math.round(parseFloat(value));
83
-
84
-        return value;
85
-    };
86
-
87
-    /**
88
-     * Extracts the string to use for a Google Analytics event's label field
89
-     * from a lib-jitsi-meet analytics event.
90
-     * @param {Object} event - The lib-jitsi-meet analytics event.
91
-     * @returns {string} - The string to use for the 'label' of a Google
92
-     * Analytics event.
93
-     * @private
94
-     */
95
-    Analytics.prototype._extractLabel = function(event) {
96
-        let label = '';
97
-
98
-        // The label field is limited to 500B. We will concatenate all
99
-        // attributes of the event, except the user agent because it may be
100
-        // lengthy and is probably included from elsewhere.
101
-        for (const property in event.attributes) {
102
-            if (property !== 'permanent_user_agent'
103
-                && property !== 'permanent_callstats_name'
104
-                && event.attributes.hasOwnProperty(property)) {
105
-                // eslint-disable-next-line prefer-template
106
-                label += property + '=' + event.attributes[property] + '&';
107
-            }
108
-        }
109
-
110
-        if (label.length > 0) {
111
-            label = label.slice(0, -1);
112
-        }
113
-
114
-        return label;
115
-    };
116
-
117
-    /**
118
-     * This is the entry point of the API. The function sends an event to
119
-     * google analytics. The format of the event is described in
120
-     * AnalyticsAdapter in lib-jitsi-meet.
121
-     * @param {Object} event - the event in the format specified by
122
-     * lib-jitsi-meet.
123
-     */
124
-    Analytics.prototype.sendEvent = function(event) {
125
-        if (!event || !ga) {
126
-            return;
127
-        }
128
-
129
-        const ignoredEvents
130
-            = [ 'e2e_rtt', 'rtp.stats', 'rtt.by.region', 'available.device',
131
-                'stream.switch.delay', 'ice.state.changed', 'ice.duration' ];
132
-
133
-        // Temporary removing some of the events that are too noisy.
134
-        if (ignoredEvents.indexOf(event.action) !== -1) {
135
-            return;
136
-        }
137
-
138
-        const gaEvent = {
139
-            'eventCategory': 'jitsi-meet',
140
-            'eventAction': this._extractAction(event),
141
-            'eventLabel': this._extractLabel(event)
142
-        };
143
-        const value = this._extractValue(event);
144
-
145
-        if (!isNaN(value)) {
146
-            gaEvent.eventValue = value;
147
-        }
148
-
149
-        ga('send', 'event', gaEvent);
150
-    };
151
-
152
-    if (typeof ctx.JitsiMeetJS === 'undefined') {
153
-        ctx.JitsiMeetJS = {};
154
-    }
155
-    if (typeof ctx.JitsiMeetJS.app === 'undefined') {
156
-        ctx.JitsiMeetJS.app = {};
157
-    }
158
-    if (typeof ctx.JitsiMeetJS.app.analyticsHandlers === 'undefined') {
159
-        ctx.JitsiMeetJS.app.analyticsHandlers = [];
160
-    }
161
-    ctx.JitsiMeetJS.app.analyticsHandlers.push(Analytics);
162
-})(window);
163
-/* eslint-enable prefer-template */

+ 0
- 0
eslint Ver arquivo


+ 0
- 18
ios/ci/build-ipa.plist.template Ver arquivo

@@ -1,18 +0,0 @@
1
-<?xml version="1.0" encoding="UTF-8"?>
2
-<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3
-<plist version="1.0">
4
-<dict>
5
-  <key>compileBitcode</key>
6
-  <false/>
7
-  <key>method</key>
8
-  <string>development</string>
9
-  <key>signingStyle</key>
10
-  <string>automatic</string>
11
-  <key>stripSwiftSymbols</key>
12
-  <true/>
13
-  <key>teamID</key>
14
-  <string>YOUR_TEAM_ID</string>
15
-  <key>thinning</key>
16
-  <string>&lt;none&gt;</string>
17
-</dict>
18
-</plist>

+ 0
- 103
ios/ci/build-ipa.sh Ver arquivo

@@ -1,103 +0,0 @@
1
-#!/bin/bash
2
-set -e
3
-
4
-# Mandatory arguments with no default values provided:
5
-# PR_REPO_SLUG - the Github name of the repo to be merged into the origin/master
6
-# PR_BRANCH - the branch to be merged, if set to "master" no merge will happen
7
-# IPA_DEPLOY_LOCATION - the location understandable by the "scp" command
8
-# executed at the end of the script to deploy the output .ipa file
9
-# LIB_JITSI_MEET_PKG (optional) - the npm package for lib-jitsi-meet which will
10
-# be put in place of the current version in the package.json file.
11
-#
12
-# Other than that the script requires the following env variables to be set:
13
-#
14
-# DEPLOY_SSH_CERT_URL - the SSH private key used by the 'scp' command to deploy
15
-# the .ipa. It is expected to be encrypted with the $ENCRYPTION_PASSWORD.
16
-# ENCRYPTION_PASSWORD - the password used to decrypt certificate/key files used
17
-# in the script.
18
-# IOS_TEAM_ID - the team ID inserted into build-ipa-.plist.template file in
19
-# place of "YOUR_TEAM_ID".
20
-
21
-function echoAndExit1() {
22
-    echo $1
23
-    exit 1
24
-}
25
-
26
-if [ -z $PR_REPO_SLUG ]; then
27
-    echoAndExit1 "No PR_REPO_SLUG defined"
28
-fi
29
-if [ -z $PR_BRANCH ]; then
30
-    echoAndExit1 "No PR_BRANCH defined"
31
-fi
32
-if [ -z $IPA_DEPLOY_LOCATION ]; then
33
-    echoAndExit1 "No IPA_DEPLOY_LOCATION defined"
34
-fi
35
-
36
-echo "PR_REPO_SLUG=${PR_REPO_SLUG} PR_BRANCH=${PR_BRANCH}"
37
-
38
-# do the merge and git log
39
-
40
-if [ $PR_BRANCH != "master" ]; then
41
-    echo "Will merge ${PR_REPO_SLUG}/${PR_BRANCH} into master"
42
-    git config remote.origin.fetch "+refs/heads/*:refs/remotes/origin/*"
43
-    git fetch origin master
44
-    git checkout master
45
-    git pull https://github.com/${PR_REPO_SLUG}.git $PR_BRANCH --no-edit
46
-fi
47
-
48
-# Link this lib-jitsi-meet checkout in jitsi-meet through the package.json
49
-if [ ! -z ${LIB_JITSI_MEET_PKG} ];
50
-then
51
-    echo "Adjusting lib-jitsi-meet package in package.json to ${LIB_JITSI_MEET_PKG}"
52
-    # escape for the sed
53
-    LIB_JITSI_MEET_PKG=$(echo $LIB_JITSI_MEET_PKG | sed -e 's/\\/\\\\/g; s/\//\\\//g; s/&/\\\&/g')
54
-    sed -i.bak -e "s/\"lib-jitsi-meet.*/\"lib-jitsi-meet\"\: \"${LIB_JITSI_MEET_PKG}\",/g" package.json
55
-    echo "Package.json lib-jitsi-meet line:"
56
-    grep lib-jitsi-meet package.json
57
-else
58
-    echo "LIB_JITSI_MEET_PKG var not set - will not modify the package.json"
59
-fi
60
-
61
-git log -20 --graph --pretty=format':%C(yellow)%h%Cblue%d%Creset %s %C(white) %an, %ar%Creset'
62
-
63
-# certificates
64
-
65
-CERT_DIR="ios/ci/certs"
66
-
67
-mkdir -p $CERT_DIR
68
-
69
-curl -L -o ${CERT_DIR}/id_rsa.enc ${DEPLOY_SSH_CERT_URL}
70
-openssl aes-256-cbc -k "$ENCRYPTION_PASSWORD" -in ${CERT_DIR}/id_rsa.enc -d -a -out ${CERT_DIR}/id_rsa
71
-chmod 0600 ${CERT_DIR}/id_rsa
72
-ssh-add ${CERT_DIR}/id_rsa
73
-
74
-npm install
75
-
76
-# Ever since the Apple Watch app has been added the bitcode for WebRTC needs to be downloaded in order to build successfully
77
-./node_modules/react-native-webrtc/tools/downloadBitcode.sh
78
-
79
-cd ios
80
-pod install --repo-update --no-ansi
81
-cd ..
82
-
83
-mkdir -p /tmp/jitsi-meet/
84
-
85
-xcodebuild archive -quiet -workspace ios/jitsi-meet.xcworkspace -scheme jitsi-meet -configuration Release -archivePath /tmp/jitsi-meet/jitsi-meet.xcarchive
86
-
87
-sed -e "s/YOUR_TEAM_ID/${IOS_TEAM_ID}/g" ios/ci/build-ipa.plist.template > ios/ci/build-ipa.plist
88
-
89
-IPA_EXPORT_DIR=/tmp/jitsi-meet/jitsi-meet-ipa
90
-
91
-xcodebuild -quiet -exportArchive -archivePath /tmp/jitsi-meet/jitsi-meet.xcarchive -exportPath $IPA_EXPORT_DIR  -exportOptionsPlist ios/ci/build-ipa.plist
92
-
93
-echo "Will try deploy the .ipa to: ${IPA_DEPLOY_LOCATION}"
94
-
95
-if [ ! -z ${SCP_PROXY_HOST} ];
96
-then
97
-    scp -o ProxyCommand="ssh -t -A -l %r ${SCP_PROXY_HOST} -o \"StrictHostKeyChecking no\" -o \"BatchMode yes\" -W %h:%p"  -o StrictHostKeyChecking=no -o LogLevel=DEBUG "${IPA_EXPORT_DIR}/jitsi-meet.ipa" "${IPA_DEPLOY_LOCATION}"
98
-else
99
-    scp -o StrictHostKeyChecking=no -o LogLevel=DEBUG "${IPA_EXPORT_DIR}/jitsi-meet.ipa" "${IPA_DEPLOY_LOCATION}"
100
-fi
101
-
102
-rm -r /tmp/jitsi-meet/
103
-rm -r $CERT_DIR

+ 0
- 100
ios/ci/setup-certificates.sh Ver arquivo

@@ -1,100 +0,0 @@
1
-# The script is based on tutorial written by Antonis Tsakiridis published at:
2
-# https://medium.com/@atsakiridis/continuous-deployment-for-ios-using-travis-ci-55dcea342d9
3
-#
4
-# APPLE_CERT_URL - the URL pointing to Apple certificate (set to
5
-# http://developer.apple.com/certificationauthority/AppleWWDRCA.cer by default)
6
-# DEPLOY_SSH_CERT_URL - the SSH private key used by the 'scp' command to deploy
7
-# the .ipa. It is expected to be encrypted with the $ENCRYPTION_PASSWORD.
8
-# ENCRYPTION_PASSWORD - the password used to decrypt certificate/key files used
9
-# in the script.
10
-# IOS_DEV_CERT_KEY_URL - URL pointing to provisioning profile certificate key
11
-# file (development-key.p12.enc from the tutorial) encrypted with the
12
-# $ENCRYPTION_PASSWORD.
13
-# IOS_DEV_CERT_URL - URL pointing to provisioning profile certificate file
14
-# (development-cert.cer.enc from the tutorial) encrypted with the
15
-# $ENCRYPTION_PASSWORD.
16
-# IOS_DEV_PROV_PROFILE_URL - URL pointing to provisioning profile file
17
-# (profile-development-olympus.mobileprovision.enc from the tutorial) encrypted
18
-# IOS_DEV_WATCH_PROV_PROFILE_URL - URL pointing to watch app provisioning profile file(encrypted).
19
-# with the $ENCRYPTION_PASSWORD.
20
-# IOS_SIGNING_CERT_PASSWORD - the password to the provisioning profile
21
-# certificate key (used to open development-key.p12 from the tutorial).
22
-
23
-function echoAndExit1() {
24
-    echo $1
25
-    exit 1
26
-}
27
-
28
-CERT_DIR=$1
29
-
30
-if [ -z $CERT_DIR ]; then
31
-  echoAndExit1 "First argument must be certificates directory"
32
-fi
33
-
34
-if [ -z $APPLE_CERT_URL ]; then
35
-    APPLE_CERT_URL="http://developer.apple.com/certificationauthority/AppleWWDRCA.cer"
36
-fi
37
-
38
-if [ -z $DEPLOY_SSH_CERT_URL ]; then
39
-  echoAndExit1 "DEPLOY_SSH_CERT_URL env var is not defined"
40
-fi
41
-
42
-if [ -z $ENCRYPTION_PASSWORD ]; then
43
-  echoAndExit1 "ENCRYPTION_PASSWORD env var is not defined"
44
-fi
45
-
46
-if [ -z $IOS_DEV_CERT_KEY_URL ]; then
47
-  echoAndExit1 "IOS_DEV_CERT_KEY_URL env var is not defined"
48
-fi
49
-
50
-if [ -z $IOS_DEV_CERT_URL ]; then
51
-  echoAndExit1 "IOS_DEV_CERT_URL env var is not defined"
52
-fi
53
-
54
-if [ -z $IOS_DEV_PROV_PROFILE_URL ]; then
55
-  echoAndExit1 "IOS_DEV_PROV_PROFILE_URL env var is not defined"
56
-fi
57
-
58
-if [ -z $IOS_DEV_WATCH_PROV_PROFILE_URL ]; then
59
-  echoAndExit1 "IOS_DEV_WATCH_PROV_PROFILE_URL env var is not defined"
60
-fi
61
-
62
-if [ -z $IOS_SIGNING_CERT_PASSWORD ]; then
63
-  echoAndExit1 "IOS_SIGNING_CERT_PASSWORD env var is not defined"
64
-fi
65
-
66
-# certificates
67
-
68
-curl -L -o ${CERT_DIR}/AppleWWDRCA.cer 'http://developer.apple.com/certificationauthority/AppleWWDRCA.cer'
69
-curl -L -o ${CERT_DIR}/dev-cert.cer.enc ${IOS_DEV_CERT_URL}
70
-curl -L -o ${CERT_DIR}/dev-key.p12.enc ${IOS_DEV_CERT_KEY_URL}
71
-curl -L -o ${CERT_DIR}/dev-profile.mobileprovision.enc ${IOS_DEV_PROV_PROFILE_URL}
72
-curl -L -o ${CERT_DIR}/dev-watch-profile.mobileprovision.enc ${IOS_DEV_WATCH_PROV_PROFILE_URL}
73
-
74
-
75
-openssl aes-256-cbc -k "$ENCRYPTION_PASSWORD" -in ${CERT_DIR}/dev-cert.cer.enc -d -a -out ${CERT_DIR}/dev-cert.cer
76
-openssl aes-256-cbc -k "$ENCRYPTION_PASSWORD" -in ${CERT_DIR}/dev-key.p12.enc -d -a -out ${CERT_DIR}/dev-key.p12
77
-openssl aes-256-cbc -k "$ENCRYPTION_PASSWORD" -in ${CERT_DIR}/dev-profile.mobileprovision.enc -d -a -out ${CERT_DIR}/dev-profile.mobileprovision
78
-openssl aes-256-cbc -k "$ENCRYPTION_PASSWORD" -in ${CERT_DIR}/dev-watch-profile.mobileprovision.enc -d -a -out ${CERT_DIR}/dev-watch-profile.mobileprovision
79
-
80
-security create-keychain -p $ENCRYPTION_PASSWORD ios-build.keychain
81
-security default-keychain -s ios-build.keychain
82
-security unlock-keychain -p $ENCRYPTION_PASSWORD ios-build.keychain
83
-security set-keychain-settings -t 3600 -l ~/Library/Keychains/ios-build.keychain
84
-
85
-echo "importing Apple cert"
86
-security import ${CERT_DIR}/AppleWWDRCA.cer -k ios-build.keychain -A
87
-echo "importing dev-cert.cer"
88
-security import ${CERT_DIR}/dev-cert.cer -k ios-build.keychain -A
89
-echo "importing dev-key.p12"
90
-security import ${CERT_DIR}/dev-key.p12 -k ios-build.keychain -P $IOS_SIGNING_CERT_PASSWORD -A
91
-
92
-echo "will set-key-partition-list"
93
-# Fix for OS X Sierra that hangs in the codesign step
94
-security set-key-partition-list -S apple-tool:,apple: -s -k $ENCRYPTION_PASSWORD ios-build.keychain > /dev/null
95
-echo "done set-key-partition-list"
96
-
97
-mkdir -p ~/Library/MobileDevice/Provisioning\ Profiles
98
-
99
-cp "${CERT_DIR}/dev-profile.mobileprovision"  ~/Library/MobileDevice/Provisioning\ Profiles/
100
-cp "${CERT_DIR}/dev-watch-profile.mobileprovision"  ~/Library/MobileDevice/Provisioning\ Profiles/

Carregando…
Cancelar
Salvar