-
Notifications
You must be signed in to change notification settings - Fork 3
Ebajrami/issue 176 #179
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Ebajrami/issue 176 #179
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
20c638f
Update publish_all_packages.yml
ebajrami c1c1585
Updating dependencies and environment in pubspec.yaml files
ebajrami 7fc369d
Update run-publish.sh
ebajrami 45fffb5
Updating dependencies
ebajrami bea4886
Update run-publish.sh
ebajrami 0a1d09f
Update run-publish.sh
ebajrami 6e388ca
Update publish_all_packages.yml
ebajrami 591d495
Updating GitHub action for publishing to pub dev.
ebajrami d2d4bad
Merge branch 'master' into ebajrami/issue-176
ebajrami 6600e1d
Update check-code-quality.yml
ebajrami 1c3b2f7
Merge branch 'master' into ebajrami/issue-176
ebajrami File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| name: Publish all packages to pub.dev | ||
| on: | ||
| workflow_dispatch: | ||
|
|
||
| jobs: | ||
| create-tag-for-publishing: | ||
| runs-on: ubuntu-latest | ||
| timeout-minutes: 15 | ||
| steps: | ||
| - name: Create git tag for each package in the repo | ||
| run: bash scripts/run-tag-release.sh |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,17 +1,28 @@ | ||
| #!/bin/bash | ||
|
|
||
| set -e | ||
| # Script which publishes a release for a given plugin | ||
| TAG="[widget-driver]:" | ||
| RED='\033[0;31m' | ||
| GREEN='\033[0;32m' | ||
| NC='\033[0m' | ||
| TAG_COLOR="\n${GREEN}${TAG}${NC}" | ||
| PROJECT_FOLDERS=("widget_driver_annotation" "widget_driver_generator" "widget_driver" "widget_driver_test") | ||
|
|
||
| # Read the tag passed as parameter which should be as package-version (e.g. widget_driver-1.2.3) | ||
| GIT_TAG=$1 | ||
|
|
||
| # Extract the package from the git tag | ||
| DIRECTORY="${GIT_TAG%%-*}" | ||
| echo -e "$TAG_COLOR Publishing $DIRECTORY" | ||
| # If it doesn't exists, report an error | ||
| if [ ! -d "$DIRECTORY" ]; then | ||
| echo -e "$TAG_COLOR $DIRECTORY doesn't exist. Make sure that tag name corresponds to one of the projects in the repo. Exiting..." | ||
| exit 1 | ||
| fi | ||
|
|
||
| echo -e "$TAG_COLOR Preparing to publish new version of $DIRECTORY" | ||
| cd $DIRECTORY || exit 2 | ||
| version=$(grep '^version:' pubspec.yaml | awk '{print $2}') | ||
| flutter pub publish -f || exit 3 | ||
|
|
||
| for project_folder in "${PROJECT_FOLDERS[@]}" | ||
| do | ||
| echo -e "$TAG_COLOR Preparing: $project_folder" | ||
| cd $project_folder | ||
| dart pub publish -f | ||
| cd .. | ||
| done | ||
| exit_code=$? | ||
| echo -e "$TAG_COLOR $DIRECTORY with version $version is successfully published." | ||
| exit 0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,28 @@ | ||
| #!/bin/bash | ||
| # Script creates git tags which are then picked up by the CI/CD pipeline to publish the packages. | ||
| set -e | ||
| # Script which creates git tags for each project in the widget driver repository | ||
| TAG="[widget-driver]:" | ||
| RED='\033[0;31m' | ||
|
ebajrami marked this conversation as resolved.
|
||
| GREEN='\033[0;32m' | ||
| NC='\033[0m' | ||
| TAG_COLOR="\n${GREEN}${TAG}${NC}" | ||
| PROJECT_FOLDERS=("widget_driver_annotation" "widget_driver_generator" "widget_driver" "widget_driver_test") | ||
|
|
||
| echo "$TAG_COLOR Preparing to publish new version" | ||
| for project_folder in "${PROJECT_FOLDERS[@]}" | ||
| do | ||
| echo -e "$TAG_COLOR Preparing: $project_folder" | ||
| cd "$project_folder" | ||
| # Extract the version from the pubspec.yaml file | ||
| version=$(grep '^version:' pubspec.yaml | awk '{print $2}') | ||
| tag="$project_folder-$version" | ||
|
|
||
| echo -e "$TAG_COLOR Creating Git tag: $tag for $project_folder and version $version" | ||
| git tag "$tag" | ||
| git push origin "$tag" | ||
| cd .. | ||
| done | ||
|
|
||
| echo -e "$TAG_COLOR Finished tagging project" | ||
| exit 0 | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,3 @@ | ||
| org.gradle.jvmargs=-Xmx1536M | ||
| org.gradle.jvmargs=-Xmx4G -XX:+HeapDumpOnOutOfMemoryError | ||
| android.useAndroidX=true | ||
| android.enableJetifier=true |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,11 +1,25 @@ | ||
| include ':app' | ||
| pluginManagement { | ||
| def flutterSdkPath = { | ||
| def properties = new Properties() | ||
| file("local.properties").withInputStream { properties.load(it) } | ||
| def flutterSdkPath = properties.getProperty("flutter.sdk") | ||
| assert flutterSdkPath != null, "flutter.sdk not set in local.properties" | ||
| return flutterSdkPath | ||
| }() | ||
|
|
||
| def localPropertiesFile = new File(rootProject.projectDir, "local.properties") | ||
| def properties = new Properties() | ||
| includeBuild("$flutterSdkPath/packages/flutter_tools/gradle") | ||
|
|
||
| assert localPropertiesFile.exists() | ||
| localPropertiesFile.withReader("UTF-8") { reader -> properties.load(reader) } | ||
| repositories { | ||
| google() | ||
| mavenCentral() | ||
| gradlePluginPortal() | ||
| } | ||
| } | ||
|
|
||
| def flutterSdkPath = properties.getProperty("flutter.sdk") | ||
| assert flutterSdkPath != null, "flutter.sdk not set in local.properties" | ||
| apply from: "$flutterSdkPath/packages/flutter_tools/gradle/app_plugin_loader.gradle" | ||
| plugins { | ||
| id "dev.flutter.flutter-plugin-loader" version "1.0.0" | ||
| id "com.android.application" version "7.3.0" apply false | ||
| id "org.jetbrains.kotlin.android" version "1.7.10" apply false | ||
| } | ||
|
|
||
| include ":app" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.