From 8a98eb98b3bb3aee5e0df02e005230dedd0ceed0 Mon Sep 17 00:00:00 2001 From: Aly ezz Date: Mon, 11 Nov 2019 19:12:08 +0200 Subject: [PATCH 1/6] ci --- .circleci/config.yml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/.circleci/config.yml b/.circleci/config.yml index ef26c6fba..f1b7f6eaa 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -120,6 +120,15 @@ jobs: xcode: "10.1.0" steps: - checkout + - run: + name: download flutter SDK + command: if ! test -f "flutter_sdk.zip"; then curl -o flutter_sdk.zip https://storage.googleapis.com/flutter_infra/releases/stable/macos/flutter_macos_v1.5.4-hotfix.2-stable.zip; fi + - run: + name: unzip flutter SDK + command: unzip flutter_sdk.zip + - run: + name: export flutter path + command: echo 'export PATH="$PATH:`pwd`/flutter/bin"' >> $BASH_ENV - run: git clone https://InstabugCI:$RELEASE_GITHUB_TOKEN@github.com/Instabug/Escape.git - run: cd Escape; swift build -c release -Xswiftc -static-stdlib - run: cd Escape/.build/release; cp -f Escape /usr/local/bin/escape From 006accae7a3a7d5e540213343de8385024059393 Mon Sep 17 00:00:00 2001 From: Aly ezz Date: Mon, 11 Nov 2019 19:13:09 +0200 Subject: [PATCH 2/6] ci --- .circleci/config.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index f1b7f6eaa..baccebadf 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -148,13 +148,13 @@ workflows: - flutter_tests - android_tests - ios_tests - filters: - branches: - only: master + # filters: + # branches: + # only: master - publish: context: cross-platform requires: - hold - filters: - branches: - only: master \ No newline at end of file + # filters: + # branches: + # only: master \ No newline at end of file From b8317de10ea98362f9ed1cbc534aa4e6df97c36b Mon Sep 17 00:00:00 2001 From: Aly ezz Date: Mon, 11 Nov 2019 19:16:01 +0200 Subject: [PATCH 3/6] ci --- .circleci/config.yml | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index baccebadf..98ee2acc0 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -142,19 +142,17 @@ workflows: context: cross-platform - android_tests - ios_tests - - hold: - type: approval - requires: - - flutter_tests - - android_tests - - ios_tests + # - hold: + # type: approval + # requires: + # - flutter_tests + # - android_tests + # - ios_tests # filters: # branches: # only: master - publish: context: cross-platform - requires: - - hold # filters: # branches: # only: master \ No newline at end of file From abbb975f971f9b729881b302157e7da55483c000 Mon Sep 17 00:00:00 2001 From: Aly ezz Date: Mon, 11 Nov 2019 19:25:14 +0200 Subject: [PATCH 4/6] ci --- .circleci/config.yml | 11 ++++++++++- release.sh | 18 ++++++++++++++++++ 2 files changed, 28 insertions(+), 1 deletion(-) create mode 100644 release.sh diff --git a/.circleci/config.yml b/.circleci/config.yml index 98ee2acc0..c0f4076b6 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -115,6 +115,13 @@ jobs: - flutter_sdk.zip - Pods + release: + docker: + - image: cirrusci/flutter + steps: + - checkout + - run: ./release.sh + publish: macos: xcode: "10.1.0" @@ -155,4 +162,6 @@ workflows: context: cross-platform # filters: # branches: - # only: master \ No newline at end of file + # only: master + -release: + context: cross-platform \ No newline at end of file diff --git a/release.sh b/release.sh new file mode 100644 index 000000000..bde9963d8 --- /dev/null +++ b/release.sh @@ -0,0 +1,18 @@ +#!/bin/sh +VERSION=$(egrep -o "version: ([0-9]-*.*)+[0-9]" pubspec.yaml | cut -d ":" -f 2) +if [ ! "${VERSION}" ] || [ -z "${VERSION}" ];then + echo "Instabug: err: Version Number not found." + exit 1 +else + mkdir -p .pub-cache + cat < $HOME/.pub-cache/credentials.json + { + "accessToken":"${ACCESS_TOKEN}", + "refreshToken":"${REFRESH_TOKEN}", + "tokenEndpoint":"https://accounts.google.com/o/oauth2/token", + "scopes":["https://www.googleapis.com/auth/userinfo.email","openid"], + "expiration":${EXPIRATION} + } +EOF + flutter packages pub publish -f +fi \ No newline at end of file From 478f910c385e7036f0c45f70ef6fbad9f1a2f81f Mon Sep 17 00:00:00 2001 From: Aly ezz Date: Mon, 11 Nov 2019 19:26:18 +0200 Subject: [PATCH 5/6] ci --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index c0f4076b6..3d0748b9b 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -163,5 +163,5 @@ workflows: # filters: # branches: # only: master - -release: + - release: context: cross-platform \ No newline at end of file From 1683fc32f3f803abf75fb25b79255f4df4257b71 Mon Sep 17 00:00:00 2001 From: Aly ezz Date: Mon, 11 Nov 2019 19:30:24 +0200 Subject: [PATCH 6/6] updates config --- .circleci/config.yml | 43 +++++++++++++++++++++---------------------- 1 file changed, 21 insertions(+), 22 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 3d0748b9b..cef161539 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -120,6 +120,7 @@ jobs: - image: cirrusci/flutter steps: - checkout + - run: chmod +x ./release.sh - run: ./release.sh publish: @@ -127,15 +128,6 @@ jobs: xcode: "10.1.0" steps: - checkout - - run: - name: download flutter SDK - command: if ! test -f "flutter_sdk.zip"; then curl -o flutter_sdk.zip https://storage.googleapis.com/flutter_infra/releases/stable/macos/flutter_macos_v1.5.4-hotfix.2-stable.zip; fi - - run: - name: unzip flutter SDK - command: unzip flutter_sdk.zip - - run: - name: export flutter path - command: echo 'export PATH="$PATH:`pwd`/flutter/bin"' >> $BASH_ENV - run: git clone https://InstabugCI:$RELEASE_GITHUB_TOKEN@github.com/Instabug/Escape.git - run: cd Escape; swift build -c release -Xswiftc -static-stdlib - run: cd Escape/.build/release; cp -f Escape /usr/local/bin/escape @@ -149,19 +141,26 @@ workflows: context: cross-platform - android_tests - ios_tests - # - hold: - # type: approval - # requires: - # - flutter_tests - # - android_tests - # - ios_tests - # filters: - # branches: - # only: master + - hold: + type: approval + requires: + - flutter_tests + - android_tests + - ios_tests + filters: + branches: + only: master - publish: context: cross-platform - # filters: - # branches: - # only: master + requires: + - hold + filters: + branches: + only: master - release: - context: cross-platform \ No newline at end of file + context: cross-platform + requires: + - hold + filters: + branches: + only: master \ No newline at end of file