Skip to content

Commit

Permalink
0.0.5
Browse files Browse the repository at this point in the history
  • Loading branch information
mym0404 committed Oct 14, 2023
1 parent 5632af9 commit 23ab3cf
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .flutter-plugins-dependencies
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"name":"shared_preferences_foundation","path":"/Users/mj/.pub-cache/hosted/pub.dev/shared_preferences_foundation-2.3.4/","shared_darwin_source":true,"native_build":true,"dependencies":[]}],"android":[{"name":"shared_preferences_android","path":"/Users/mj/.pub-cache/hosted/pub.dev/shared_preferences_android-2.2.1/","native_build":true,"dependencies":[]}],"macos":[{"name":"shared_preferences_foundation","path":"/Users/mj/.pub-cache/hosted/pub.dev/shared_preferences_foundation-2.3.4/","shared_darwin_source":true,"native_build":true,"dependencies":[]}],"linux":[{"name":"path_provider_linux","path":"/Users/mj/.pub-cache/hosted/pub.dev/path_provider_linux-2.2.1/","native_build":false,"dependencies":[]},{"name":"shared_preferences_linux","path":"/Users/mj/.pub-cache/hosted/pub.dev/shared_preferences_linux-2.3.2/","native_build":false,"dependencies":["path_provider_linux"]}],"windows":[{"name":"path_provider_windows","path":"/Users/mj/.pub-cache/hosted/pub.dev/path_provider_windows-2.2.1/","native_build":false,"dependencies":[]},{"name":"shared_preferences_windows","path":"/Users/mj/.pub-cache/hosted/pub.dev/shared_preferences_windows-2.3.2/","native_build":false,"dependencies":["path_provider_windows"]}],"web":[{"name":"shared_preferences_web","path":"/Users/mj/.pub-cache/hosted/pub.dev/shared_preferences_web-2.2.1/","dependencies":[]}]},"dependencyGraph":[{"name":"path_provider_linux","dependencies":[]},{"name":"path_provider_windows","dependencies":[]},{"name":"shared_preferences","dependencies":["shared_preferences_android","shared_preferences_foundation","shared_preferences_linux","shared_preferences_web","shared_preferences_windows"]},{"name":"shared_preferences_android","dependencies":[]},{"name":"shared_preferences_foundation","dependencies":[]},{"name":"shared_preferences_linux","dependencies":["path_provider_linux"]},{"name":"shared_preferences_web","dependencies":[]},{"name":"shared_preferences_windows","dependencies":["path_provider_windows"]}],"date_created":"2023-10-15 00:28:07.665824","version":"3.13.6"}
{"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"name":"shared_preferences_foundation","path":"/Users/mj/.pub-cache/hosted/pub.dev/shared_preferences_foundation-2.3.4/","shared_darwin_source":true,"native_build":true,"dependencies":[]}],"android":[{"name":"shared_preferences_android","path":"/Users/mj/.pub-cache/hosted/pub.dev/shared_preferences_android-2.2.1/","native_build":true,"dependencies":[]}],"macos":[{"name":"shared_preferences_foundation","path":"/Users/mj/.pub-cache/hosted/pub.dev/shared_preferences_foundation-2.3.4/","shared_darwin_source":true,"native_build":true,"dependencies":[]}],"linux":[{"name":"path_provider_linux","path":"/Users/mj/.pub-cache/hosted/pub.dev/path_provider_linux-2.2.1/","native_build":false,"dependencies":[]},{"name":"shared_preferences_linux","path":"/Users/mj/.pub-cache/hosted/pub.dev/shared_preferences_linux-2.3.2/","native_build":false,"dependencies":["path_provider_linux"]}],"windows":[{"name":"path_provider_windows","path":"/Users/mj/.pub-cache/hosted/pub.dev/path_provider_windows-2.2.1/","native_build":false,"dependencies":[]},{"name":"shared_preferences_windows","path":"/Users/mj/.pub-cache/hosted/pub.dev/shared_preferences_windows-2.3.2/","native_build":false,"dependencies":["path_provider_windows"]}],"web":[{"name":"shared_preferences_web","path":"/Users/mj/.pub-cache/hosted/pub.dev/shared_preferences_web-2.2.1/","dependencies":[]}]},"dependencyGraph":[{"name":"path_provider_linux","dependencies":[]},{"name":"path_provider_windows","dependencies":[]},{"name":"shared_preferences","dependencies":["shared_preferences_android","shared_preferences_foundation","shared_preferences_linux","shared_preferences_web","shared_preferences_windows"]},{"name":"shared_preferences_android","dependencies":[]},{"name":"shared_preferences_foundation","dependencies":[]},{"name":"shared_preferences_linux","dependencies":["path_provider_linux"]},{"name":"shared_preferences_web","dependencies":[]},{"name":"shared_preferences_windows","dependencies":["path_provider_windows"]}],"date_created":"2023-10-15 00:43:34.366124","version":"3.13.6"}
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: local_file_preferences
description: This package provides local json file saving and Loading utility.
version: 0.0.3
version: 0.0.5
homepage: https://mj-studio-library.github.io/flutter-local-file-preferences/
repository: https://github.com/mj-studio-library/flutter-local-file-preferences

Expand Down
6 changes: 1 addition & 5 deletions tool/publish/check_version.dart
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import 'dart:io';

import 'package:yaml/yaml.dart';

// ignore_for_file: avoid_print
Expand All @@ -17,11 +18,6 @@ void main(List<String> args) {
tagVersion = tagVersion.substring(1);
}

if (pubspecVersion != tagVersion) {
throw Exception(
'pubspec version ($pubspecVersion) and tag version ($tagVersion) are different');
}

String changeLog = File('CHANGELOG.md').readAsStringSync();
if (!changeLog.startsWith('## $tagVersion')) {
throw Exception(
Expand Down
29 changes: 29 additions & 0 deletions tool/publish/publish.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
fail() {
fail_without_exit "${1}"
exit 1
}

tag=$1

flutter pub get
if [[ $? -ne 0 ]]; then
fail 'fail'
fi
flutter pub run tool/publish/check_version.dart 0.0.4
if [[ $? -ne 0 ]]; then
fail 'fail'
fi
flutter analyze
if [[ $? -ne 0 ]]; then
fail 'fail'
fi
dart format --set-exit-if-changed .
if [[ $? -ne 0 ]]; then
fail 'fail'
fi
flutter pub publish --force
if [[ $? -ne 0 ]]; then
fail 'fail'
fi
git tag $tag
git push origin $tag

0 comments on commit 23ab3cf

Please sign in to comment.