Skip to content

Commit

Permalink
Merge pull request #191 from builttoroam/develop
Browse files Browse the repository at this point in the history
Prerelease
  • Loading branch information
bhl09 authored Mar 20, 2020
2 parents 5537a32 + 27aa6b3 commit c7f3594
Show file tree
Hide file tree
Showing 24 changed files with 1,683 additions and 635 deletions.
Binary file added .DS_Store
Binary file not shown.
50 changes: 0 additions & 50 deletions .travis.yml

This file was deleted.

171 changes: 171 additions & 0 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,171 @@
variables:
# The $(FlutterToolPath) variable is generated by the FlutterInstall task
# See code in the Flutter Build task https://github.com/aloisdeniel/vsts-flutter-tasks/blob/master/tasks/build/index.ts
flutterExecPath: $(FlutterToolPath)/flutter.bat
versionNumberRegex: '(?<=version: ).*'

trigger:
batch: 'true'
branches:
include:
- develop
- release
- hotfix
- master
paths:
include:
- device_calendar/*

stages:
# ----------- CI -----------
- stage: Build
jobs:
- job: BuildAndroidAndIos
pool:
vmImage: 'macOS-latest'
steps:
- task: FlutterInstall@0
displayName: 'Flutter install'
inputs:
channel: 'stable'
version: 'latest'

- task: FlutterBuild@0
displayName: 'Flutter build - Android'
inputs:
target: 'aab'
projectDirectory: 'device_calendar/example'

- task: FlutterBuild@0
displayName: 'Flutter build - iOS'
inputs:
target: 'ios'
projectDirectory: 'device_calendar/example'
iosCodesign: false

# -----------CD Pre-release -----------
- stage: DevelopmentRelease
dependsOn: Build
condition: and(succeeded(), in(variables['Build.SourceBranch'], 'refs/heads/release', 'refs/heads/hotfix'))
jobs:
- job: ReleaseDevelopmentVersion
pool:
vmImage: 'windows-latest'
steps:
- task: FlutterInstall@0
displayName: 'Flutter install'
inputs:
channel: 'stable'
version: 'latest'

- task: PowerShell@2
displayName: 'Pre-release versioning - pubspec.yaml'
inputs:
targetType: 'inline'
script: |
[string] $version = select-string -path "$(Build.SourcesDirectory)/device_calendar/pubspec.yaml" -pattern "$(versionNumberRegex)" | %{ $_.Matches[0].Value }
Write-Host "##vso[task.setvariable variable=currentVersion]$version"
[string] $pubspecContent = Get-Content -Path "$(Build.SourcesDirectory)/device_calendar/pubspec.yaml" -Raw
Write-Host " (i) Current version: $version"
Write-Host " (i) Original pubspec.yaml content: $pubspecContent"
[bool] $hasMatches = $pubspecContent -match $versionRegex
[string] $newPubspecContent = $pubspecContent -replace $version, "$version-dev.$(Build.BuildID)"
Write-Host " (i) Updated pubspec.yaml content: $newPubspecContent"
$newPubspecContent | Set-Content -Path "$(Build.SourcesDirectory)/device_calendar/pubspec.yaml"
- task: PowerShell@2
displayName: 'Pre-release versioning - CHANGELOG.md'
inputs:
targetType: 'inline'
script: |
[string] $changelogContent = Get-Content -Path "$(Build.SourcesDirectory)/device_calendar/CHANGELOG.md" -Raw
Write-Host " (i) Current version: $env.currentVersion"
Write-Host " (i) Original CHANGELOG.md content: $changelogContent"
[string] $newChangelogContent = $changelogContent -replace $env:currentVersion, "$env:currentVersion-dev.$(Build.BuildID)"
Write-Host " (i) Updated CHANGELOG.md content: $newChangelogContent"
$newChangelogContent | Set-Content -Path "$(Build.SourcesDirectory)/device_calendar/CHANGELOG.md"
- task: CmdLine@2
displayName: 'Dry run publish'
inputs:
workingDirectory: '$(Build.SourcesDirectory)/device_calendar'
script: '$(flutterExecPath) pub publish --dry-run'

- task: CmdLine@2
displayName: 'Publish'
inputs:
workingDirectory: '$(Build.SourcesDirectory)/device_calendar'
script: '$(flutterExecPath) pub publish --force'

# ----------- CD Production -----------
- stage: Release
dependsOn: Build
condition: and(succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/master'))
jobs:
- job: Release
pool:
vmImage: 'windows-latest'
steps:
- task: FlutterInstall@0
displayName: 'Flutter install'
inputs:
channel: 'stable'
version: 'latest'

- task: PowerShell@2
displayName: 'Get version from pubspec.yaml'
inputs:
targetType: 'inline'
script: |
[string] $version = select-string -path "$(Build.SourcesDirectory)/device_calendar/pubspec.yaml" -pattern $(versionNumberRegex) | %{ $_.Matches[0].Value }
Write-Host "##vso[task.setvariable variable=currentVersion]$version"
- task: PowerShell@2
displayName: 'Get version summary from CHANGELOG.md'
inputs:
targetType: 'inline'
script: |
[string] $summary = select-string -path "$(Build.SourcesDirectory)/device_calendar/CHANGELOG.md" -pattern "($([regex]::escape($env:currentVersion))).*" | %{ $_.Matches[0].Value }
Write-Host "##vso[task.setvariable variable=versionSummary]$summary"
- task: CmdLine@2
displayName: 'Dry run publish'
inputs:
workingDirectory: '$(Build.SourcesDirectory)/device_calendar'
script: '$(flutterExecPath) pub publish --dry-run'

- task: CmdLine@2
displayName: 'Publish'
inputs:
workingDirectory: '$(Build.SourcesDirectory)/device_calendar'
script: '$(flutterExecPath) pub publish --force'

- task: GitHubReleasePublish@1
displayName: 'Tag a release to GitHub'
inputs:
githubEndpoint: 'GitHub Tagging'
manuallySetRepository: false
githubRepository: 'builttoroam/flutter_plugins'
githubTag: 'v$(currentVersion)'
githubReleaseTitle: '$(versionSummary)'
githubReleaseDraft: false
githubReleasePrerelease: false
githubIgnoreAssets: false
githubReleaseAsset: '$(Build.ArtifactStagingDirectory)/*'
githubReuseRelease: false
githubReuseDraftOnly: false
githubSkipDuplicatedAssets: false
githubEditRelease: false
githubDeleteEmptyTag: false
15 changes: 15 additions & 0 deletions device_calendar/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,20 @@
# Changelog

## 3.1.0 6th March 2020 - Bug fixes and new features

* Boolean variable `isDefault` added for issue [145](https://github.com/builttoroam/flutter_plugins/issues/145) (**NOTE**: This is not supported Android API 16 or lower, `isDefault` will always be false)
* Events with 'null' title now defaults to 'New Event', issue [126](https://github.com/builttoroam/flutter_plugins/issues/126)
* Updated property summaries for issues [121](https://github.com/builttoroam/flutter_plugins/issues/121) and [122](https://github.com/builttoroam/flutter_plugins/issues/122)
* Updated example documentation for issue [119](https://github.com/builttoroam/flutter_plugins/issues/119)
* Read-only calendars cannot be edited or deleted for the example app
* Added `DayOfWeekGroup` enum and an extension `getDays` to get corresponding dates of the enum values
* Added to retrieve colour for calendars. Thanks to [nadavfima](https://github.com/nadavfima) for the contribution and PR to add colour support for both Android and iOS
* Added compatibility with a new Flutter plugin for Android. Thanks to the PR submitted by [RohitKumarMishra](https://github.com/RohitKumarMishra)
* [Android] Fixed all day timezone issue [164](https://github.com/builttoroam/flutter_plugins/issues/164)
* Added support for deleting individual or multiple instances of a recurring event for issue [108](https://github.com/builttoroam/flutter_plugins/issues/108)
* Ability to add local calendars with a desired colour for issue [115](https://github.com/builttoroam/flutter_plugins/issues/115)
* Returns account name and type for each calendars for issue [179](https://github.com/builttoroam/flutter_plugins/issues/179)

## 3.0.0+3 3rd February 2020

* Fixed all day conditional check for issue [162](https://github.com/builttoroam/flutter_plugins/issues/162)
Expand Down
8 changes: 5 additions & 3 deletions device_calendar/README.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,19 @@
# Device Calendar Plugin

[![pub package](https://img.shields.io/pub/v/device_calendar.svg)](https://pub.dartlang.org/packages/device_calendar) [![Build Status](https://travis-ci.org/builttoroam/flutter_plugins.svg)](https://travis-ci.org/builttoroam/flutter_plugins)
[![pub package](https://img.shields.io/pub/v/device_calendar.svg)](https://pub.dartlang.org/packages/device_calendar) [![Build Status](https://dev.azure.com/builttoroam/Flutter%20Plugins/_apis/build/status/Device%20Calendar)](https://dev.azure.com/builttoroam/Flutter%20Plugins/_build/latest?definitionId=106)

A cross platform plugin for modifying calendars on the user's device.

## Features

* Ability to request permissions to modify calendars on the user's device
* Ability to check if permissions to modify the calendars on the user's device have been granted
* Retrieve calendars on the user's device
* Ability to add or retrieve calendars on the user's device
* Retrieve events associated with a calendar
* Ability to add, update or delete events from a calendar
* Ability to set up recurring events (NOTE: deleting a recurring event will currently delete all instances of it)
* Ability to set up, edit or delete recurring events
* **NOTE**: Editing a recurring event will currently edit all instances of it
* **NOTE**: Deleting multiple instances in **Android** takes time to update, you'll see the changes after a few seconds
* Ability to add, modify or remove attendees and receive if an attendee is an organiser for an event
* Ability to setup reminders for an event

Expand Down
Loading

0 comments on commit c7f3594

Please sign in to comment.