Skip to content

Commit 661f321

Browse files
Merge pull request LikeMindsCommunity#53 from LikeMindsCommunity/hotfix/v1.3.6
Hotfix/v1.3.6
2 parents 8f9d8b6 + 074a31c commit 661f321

File tree

10 files changed

+377
-171
lines changed

10 files changed

+377
-171
lines changed

.github/workflows/pull_request.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: Feed SDK test on every PR
2+
3+
on:
4+
pull_request:
5+
branches-ignore:
6+
- master
7+
8+
jobs:
9+
run-flutter-test:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v3
13+
14+
- uses: subosito/flutter-action@v2
15+
with:
16+
flutter-version: ${{ env.FLUTTER_VERSION }}
17+
- run: flutter pub get
18+
19+
- name: Lint
20+
run: flutter analyze > lint-results.txt
21+
22+
- name: Upload the lint results as an artifact
23+
if: always()
24+
uses: actions/upload-artifact@v2
25+
with:
26+
name: lint-results
27+
path: lint-results.txt

.github/workflows/release.yml

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
name: Create Tag and Release on Version Change
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
8+
permissions: write-all
9+
10+
jobs:
11+
create_tag:
12+
name: Create Git Tag
13+
runs-on: ubuntu-latest
14+
15+
steps:
16+
- name: Checkout code
17+
uses: actions/checkout@v3
18+
with:
19+
fetch-depth: 0
20+
21+
- name: Check for version changes
22+
run: |
23+
# Fetch all tags from the remote repository
24+
git fetch --tags
25+
26+
# Get the previous version from the last release tag
27+
export previous_version=$(git describe --tags --abbrev=0)
28+
29+
# Get the current version from pubspec.yaml
30+
export current_version=$(cat pubspec.yaml | grep 'version:' | awk '{print $2}')
31+
32+
if [[ "$previous_version" != "v$current_version" ]]; then
33+
echo "Version has changed from $previous_version to v$current_version."
34+
else
35+
echo "Version has not changed."
36+
exit 1
37+
fi
38+
39+
- name: Push Git Tag
40+
run: |
41+
# Git login
42+
git config --global user.name "$(git log -n 1 --pretty=format:%an)"
43+
git config --global user.email "$(git log -n 1 --pretty=format:%ae)"
44+
45+
# Push a Git tag with the new version
46+
export current_version=$(cat pubspec.yaml | grep 'version:' | awk '{print $2}')
47+
git tag -a "v$current_version" -m "Version $current_version"
48+
git push origin "v$current_version"
49+
env:
50+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
51+
52+
create-github-release:
53+
name: Create GitHub Release
54+
runs-on: ubuntu-latest
55+
needs: create_tag
56+
permissions:
57+
contents: write
58+
steps:
59+
- name: Checkout code
60+
uses: actions/checkout@v3
61+
with:
62+
fetch-depth: 0
63+
64+
- name: Create Release
65+
run: gh release create "$(git describe --tags --abbrev=0)" --generate-notes
66+
env:
67+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

analysis_options.yaml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,30 @@ include: package:flutter_lints/flutter.yaml
22

33
# Additional information about this file can be found at
44
# https://dart.dev/guides/language/analysis-options
5+
linter:
6+
# The lint rules applied to this project can be customized in the
7+
# section below to disable rules from the `package:flutter_lints/flutter.yaml`
8+
# included above or to enable additional rules. A list of all available lints
9+
# and their documentation is published at
10+
# https://dart-lang.github.io/linter/lints/index.html.
11+
#
12+
# Instead of disabling a lint rule for the entire project in the
13+
# section below, it can also be suppressed for a single line of code
14+
# or a specific dart file by using the `// ignore: name_of_lint` and
15+
# `// ignore_for_file: name_of_lint` syntax on the line or in the file
16+
# producing the lint.
17+
rules:
18+
# Style rules
19+
- camel_case_types
20+
- library_names
21+
- avoid_catches_without_on_clauses
22+
- avoid_catching_errors
23+
- avoid_empty_else
24+
- unnecessary_brace_in_string_interps
25+
- avoid_redundant_argument_values
26+
- leading_newlines_in_multiline_strings
27+
# formatting
28+
- lines_longer_than_80_chars
29+
- curly_braces_in_flow_control_structures
30+
# doc comments
31+
- slash_for_doc_comments

example/pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev
1616
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
1717
# In Windows, build-name is used as the major, minor, and patch parts
1818
# of the product and file versions while build-number is used as the build suffix.
19-
version: 1.3.5
19+
version: 1.3.6
2020

2121
environment:
2222
sdk: '>=3.0.0 <4.0.0'

lib/src/widgets/media/carousel.dart

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,6 @@ class _LMCarouselState extends State<LMCarousel> {
104104
@override
105105
Widget build(BuildContext context) {
106106
mapAttachmentsToWidget();
107-
final size = MediaQuery.of(context).size.width;
108107
return Container(
109108
decoration: BoxDecoration(
110109
borderRadius: BorderRadius.circular(widget.borderRadius ?? 0),

0 commit comments

Comments
 (0)