Skip to content

Commit

Permalink
2
Browse files Browse the repository at this point in the history
  • Loading branch information
Ellet committed Dec 5, 2023
1 parent 35a9502 commit 7207dbf
Show file tree
Hide file tree
Showing 8 changed files with 48 additions and 7 deletions.
21 changes: 18 additions & 3 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,30 @@ jobs:
# - run: dart tool/generate-code.dart

- name: Re-generate the translations
run: ./scripts/regenerate-translations.sh

run: ./scripts/regenerate_translations.sh

- name: Re-generate the versions
run: dart ./scripts/regenerate_versions.dart

# This is needed in order for the authentication to success
# dart pub token add https://pub.dev --env-var PUB_TOKEN
# Requests to "https://pub.dev" will now be authenticated using the secret token stored in the environment variable "PUB_TOKEN".
- uses: dart-lang/setup-dart@v1
## dart-lang/setup-dart/.github/workflows/publish.yml@v1
# - name: Update the authorization requests to "https://pub.dev" to use the environment variable "PUB_TOKEN".
# run: dart pub token add https://pub.dev --env-var PUB_TOKEN

- name: Publish
- name: Publish flutter_quill
run: flutter pub publish --force

- name: Publish flutter_quill_extensions
run: flutter pub publish --force
working-directory: ./flutter_quill_extensions

- name: Publish flutter_quill_test
run: flutter pub publish --force
working-directory: ./flutter_quill_test

- name: Publish quill_html_converter
run: flutter pub publish --force
working-directory: ./packages/quill_html_converter
2 changes: 1 addition & 1 deletion doc/translation.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ flutter gen-l10n
or:

```
./scripts/regenerate-translations.sh
./scripts/regenerate_translations.sh
```


Expand Down
2 changes: 1 addition & 1 deletion flutter_quill_extensions/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: flutter_quill_extensions
description: Embed extensions for flutter_quill including image, video, formula and etc.
version: 0.8.0-dev
version: 9.0.0-dev
homepage: https://github.com/singerdmx/flutter-quill/tree/master/flutter_quill_extensions/
repository: https://github.com/singerdmx/flutter-quill/tree/master/flutter_quill_extensions/
issue_tracker: https://github.com/singerdmx/flutter-quill/issues/
Expand Down
2 changes: 1 addition & 1 deletion flutter_quill_test/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: flutter_quill_test
description: Test utilities for flutter_quill which includes methods to simplify interacting with the editor in test cases.
version: 0.0.5
version: 9.0.0-dev
homepage: https://github.com/singerdmx/flutter-quill/tree/master/flutter_quill_test/
repository: https://github.com/singerdmx/flutter-quill/tree/master/flutter_quill_test/
issue_tracker: https://github.com/singerdmx/flutter-quill/issues/
Expand Down
1 change: 1 addition & 0 deletions pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ dev_dependencies:
flutter_quill_test: ^0.0.4
test: ^1.24.3
intl_translation: ^0.18.2
yaml_edit: ^2.1.1

flutter:
uses-material-design: true
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/bash

# Important: make sure to run the script in the root folder of the repo:
# ./scripts/regenerate-translations.sh
# ./scripts/regenerate_translations.sh
# otherwise the script could delete the wrong folder in rare cases

echo ""
Expand Down
24 changes: 24 additions & 0 deletions scripts/regenerate_versions.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
import 'dart:io' show File;

import 'package:yaml_edit/yaml_edit.dart';

// You must run this script in the root folder of the repo and not inside the scripts

// ignore: unused_import
import '../version.dart';

Future<void> main(List<String> args) async {
await updatePubspecYamlFile('./pubspec.yaml');
await updatePubspecYamlFile('./flutter_quill_extensions/pubspec.yaml');
await updatePubspecYamlFile('./flutter_quill_test/pubspec.yaml');
await updatePubspecYamlFile('./packages/quill_html_converter/pubspec.yaml');
}

Future<void> updatePubspecYamlFile(String path) async {
final file = File(path);
final yaml = await file.readAsString();
final yamlEditor = YamlEditor(yaml)..update(['version'], version);
await file.writeAsString(yamlEditor.toString());
// ignore: avoid_print
print(yamlEditor.toString());
}
1 change: 1 addition & 0 deletions version.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
const version = '9.0.0-dev';

0 comments on commit 7207dbf

Please sign in to comment.