Skip to content

Commit

Permalink
adding channel param to install sdk (#49)
Browse files Browse the repository at this point in the history
rename to release channel

change version to channel

change string to enum for channel

add integration test for channel

remove typo

update comment

remove local formatting changes

Update executor

Update machine executor version

Co-authored-by: Alex Fernandez <[email protected]>
  • Loading branch information
marboledacci and LegendAF authored Nov 5, 2024
1 parent d163a37 commit 7d9e1a2
Show file tree
Hide file tree
Showing 7 changed files with 48 additions and 12 deletions.
29 changes: 24 additions & 5 deletions .circleci/test-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ version: 2.1
orbs:
flutter: circleci/flutter@dev:<<pipeline.git.revision>>
orb-tools: circleci/[email protected]
android: circleci/android@2.1.2
android: circleci/android@3.0.1
filters: &filters
tags:
only: /.*/
Expand All @@ -19,13 +19,30 @@ jobs:
app-dir: ./sample
- flutter/install_ios_gem:
app-dir: ./sample
- run:
- run:
name: 'check that the sdk is installed properly'
command: cd sample && flutter doctor && rbenv version
integration-test-channel-beta:
macos:
xcode: 14.2.0
resource_class: macos.m1.large.gen1
steps:
- checkout
- flutter/install_sdk_and_pub:
app-dir: ./sample
channel: beta
version: 3.27.0-0.1.pre
- flutter/install_ios_pod:
app-dir: ./sample
- flutter/install_ios_gem:
app-dir: ./sample
- run:
name: 'check that the sdk is installed properly from the beta channel'
command: cd sample && flutter doctor && rbenv version
integration-test-linux:
executor:
name: android/android-machine
tag: '2022.09.1'
name: android/android_machine
tag: '2022.12.1'
steps:
- checkout
- flutter/install_sdk_and_pub:
Expand All @@ -35,7 +52,7 @@ jobs:
app-dir: ./sample
- flutter/install_android_gem:
app-dir: ./sample
- run:
- run:
name: 'check that the sdk is installed properly'
command: cd sample && flutter doctor && rvm version
workflows:
Expand All @@ -44,6 +61,8 @@ workflows:
# Make sure to include "filters: *filters" in every test job you want to run as part of your deployment.
- integration-test-macos:
filters: *filters
- integration-test-channel-beta:
filters: *filters
- integration-test-linux:
filters: *filters
- flutter/unit_test:
Expand Down
13 changes: 8 additions & 5 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,15 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [Unreleased]
- Current development changes [ to be moved to release ]

## [1.0.0] - YYYY-MM-DD
## [2.1.0] - 2024-10-31
### Added
- Initial Release
### Changed
- Initial Release
### Removed
- feat: added channal parameter to `flutter/install_sdk` and `flutter/install_sdk_and_pub` so that you can install from `beta` releases if you want

## [2.0.4] - 2024-04-06
- fix: flutter installation fail by @KevinJ1008 in #41
- fix: Address broken install script by @zaki-arain in #44

## [1.0.0] - 2020-06-22
- Initial Release


Expand Down
6 changes: 6 additions & 0 deletions src/commands/install_sdk.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
description: >
Install Flutter SDK
parameters:
channel:
type: enum
description: The release channel your version is in.
default: "stable"
enum: ["stable", "beta"]
version:
type: string
description: The target version for the Flutter SDK.
Expand All @@ -18,6 +23,7 @@ steps:
environment:
ORB_EVAL_INSTALL_LOCATION: <<parameters.install-location>>
ORB_VAL_FLUTTER_SDK_VERSION: <<parameters.version>>
ORB_VAL_FLUTTER_RELEASE_CHANNEL: <<parameters.channel>>
command: <<include(scripts/install-sdk.sh)>>
- run:
name: Run flutter doctor
Expand Down
6 changes: 6 additions & 0 deletions src/commands/install_sdk_and_pub.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
description: >
Install Flutter SDK and your flutter packages with automated caching and best practices applied. Requires lock file.
parameters:
channel:
type: enum
description: The release channel your version is in.
default: "stable"
enum: ["stable", "beta"]
version:
type: string
description: The target version for the Flutter SDK.
Expand All @@ -19,6 +24,7 @@ parameters:
type: string
steps:
- install_sdk:
channel: <<parameters.channel>>
version: <<parameters.version>>
install-location: <<parameters.install-location>>
- install_pub:
Expand Down
1 change: 1 addition & 0 deletions src/examples/install_for_android_machine.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ usage:
name: android/android-machine
steps:
- flutter/install_sdk_and_pub:
channel: stable
version: 3.0.3
- flutter/install_android_gradle_dependencies
- flutter/install_android_gem
Expand Down
1 change: 1 addition & 0 deletions src/examples/install_for_macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ usage:
xcode: 12.5.1
steps:
- flutter/install_sdk_and_pub:
channel: stable
version: 3.0.3
- flutter/install_ios_pod
- flutter/install_ios_gem
Expand Down
4 changes: 2 additions & 2 deletions src/scripts/install-sdk.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ function install_flutter() {
[[ $arch =~ "arm64" ]] && version="flutter_${uname}_arm64" || version="flutter_${uname}"
[[ $uname == "linux" ]] && suffix="tar.xz" || suffix="zip"

baseurl="https://storage.googleapis.com/flutter_infra_release/releases/stable"
fullurl="$baseurl/$uname/${version}_$ORB_VAL_FLUTTER_SDK_VERSION-stable.${suffix}"
baseurl="https://storage.googleapis.com/flutter_infra_release/releases/$ORB_VAL_FLUTTER_RELEASE_CHANNEL"
fullurl="$baseurl/$uname/${version}_$ORB_VAL_FLUTTER_SDK_VERSION-$ORB_VAL_FLUTTER_RELEASE_CHANNEL.${suffix}"

curl -o "flutter_sdk.${suffix}" "$fullurl"

Expand Down

0 comments on commit 7d9e1a2

Please sign in to comment.