Skip to content

Commit

Permalink
[sync] 2023/11/16 (cfug#1377)
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexV525 authored Nov 17, 2023
2 parents 28cbbfe + cbe8769 commit e7806d3
Show file tree
Hide file tree
Showing 247 changed files with 4,610 additions and 962 deletions.
24 changes: 23 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ env:
NODE_VERSION: 20

jobs:

test:
name: Check excerpts and run tests
runs-on: ubuntu-latest
if: github.repository == 'cfug/flutter.cn'
strategy:
Expand All @@ -42,7 +42,29 @@ jobs:
run: make test
continue-on-error: ${{ matrix.experimental }}

# linkcheck:
# name: Build site and check links
# runs-on: ubuntu-latest
# if: ${{ github.ref != 'refs/heads/main' }}
# steps:
# - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
# with:
# submodules: recursive
# - name: Build site and check links
# run: make build BUILD_CONFIGS=_config.yml,_config_stage.yml
# - name: Install Node for Firebase install
# uses: actions/setup-node@8f152de45cc393bb48ce5d89d36b731f54556e65
# with:
# node-version: ${{ env.NODE_VERSION }}
# - name: Install Firebase CLI
# run: npm install -g [email protected]
# - uses: dart-lang/setup-dart@b64355ae6ca0b5d484f0106a033dd1388965d06d
# with:
# sdk: stable
# - run: tool/check-links.sh

deploy:
name: Deploy to production
needs: test
runs-on: ubuntu-latest
if: |
Expand Down
8 changes: 4 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,9 @@ VOLUME /flutter
# NOTE You will get a warning "Woah! You appear to be trying to run flutter as root."
# and this is to be disregarded since this image is never deployed to production.
RUN flutter doctor
RUN flutter --version
RUN flutter config --no-analytics \
&& flutter config --no-cli-animations \
&& flutter --version
RUN dart pub get


Expand All @@ -67,9 +69,7 @@ RUN mkdir -p /etc/apt/keyrings \
&& npm install -g npm # Ensure latest npm

# Install global Firebase CLI
RUN npm install -g [email protected]


# RUN npm install -g [email protected]

# ============== FLUTTER CODE TESTS ==============
FROM flutter AS tests
Expand Down
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ gem 'jekyll-sass-converter', '~> 3.0.0'
gem 'webrick'

# Used for custom _plugins
gem 'activesupport', '~> 7.1.1'
gem 'activesupport', '~> 7.1.2'
gem 'liquid-tag-parser', '~> 2.0.2'

group :jekyll_plugins do
Expand Down
10 changes: 5 additions & 5 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
GEM
remote: https://rubygems.org/
specs:
activesupport (7.1.1)
activesupport (7.1.2)
base64
bigdecimal
concurrent-ruby (~> 1.0, >= 1.0.2)
Expand All @@ -13,12 +13,12 @@ GEM
tzinfo (~> 2.0)
addressable (2.8.5)
public_suffix (>= 2.0.2, < 6.0)
base64 (0.1.1)
base64 (0.2.0)
bigdecimal (3.1.4)
colorator (1.1.0)
concurrent-ruby (1.2.2)
connection_pool (2.4.1)
drb (2.1.1)
drb (2.2.0)
ruby2_keywords
em-websocket (0.5.3)
eventmachine (>= 0.12.9)
Expand Down Expand Up @@ -71,7 +71,7 @@ GEM
mercenary (0.4.0)
mini_portile2 (2.8.5)
minitest (5.20.0)
mutex_m (0.1.2)
mutex_m (0.2.0)
nokogiri (1.15.4)
mini_portile2 (~> 2.8.2)
racc (~> 1.4)
Expand Down Expand Up @@ -101,7 +101,7 @@ PLATFORMS
ruby

DEPENDENCIES
activesupport (~> 7.1.1)
activesupport (~> 7.1.2)
jekyll (= 4.3.2)
jekyll-include-cache (~> 0.2.1)
jekyll-sass-converter (~> 3.0.0)
Expand Down
14 changes: 4 additions & 10 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@


all: gen-env up down debug shell setup serve emulate test debug-tests \
stop-tests build-image build build-image-and-check-links debug-build \
stop-tests build-image build debug-build \
deploy stage-channel stage-local clean reinstall purge

.DEFAULT_GOAL := up
Expand Down Expand Up @@ -118,13 +118,6 @@ build-image:
DOCKER_BUILDKIT=1 docker build --rm --no-cache --target build \
--build-arg BUILD_CONFIGS=${BUILD_CONFIGS} -t ${BUILD_TAG} .

# Build the production site & Run the link checker
# Usage: `make check-links`
build-image-and-check-links:
DOCKER_BUILDKIT=1 docker build --rm --no-cache --target checklinks \
--build-arg BUILD_CONFIGS=${BUILD_CONFIGS} -t ${BUILD_TAG} .
docker run --rm -t ${BUILD_TAG}

# Hit the shell on the built site imag
# This requires that a build:commit image has been built
# Usage: `make debug-build`
Expand All @@ -134,11 +127,12 @@ debug-build:
# Build the production image and copy site build to local.
# This will reset and also clean up after finished.
# NOTE important to disable tests with the local build as
# those will be run on the Github action.
# those will be run on the GitHub action.
# Usage: `make build`
build:
make clean
make build-image-and-check-links
DOCKER_BUILDKIT=1 docker build --rm --no-cache --target build \
--build-arg BUILD_CONFIGS=${BUILD_CONFIGS} -t ${BUILD_TAG} .
docker run --rm -d --name ${BUILD_NAME} -t ${BUILD_TAG}
docker cp ${BUILD_NAME}:/app/_site _site
docker stop ${BUILD_NAME}
Expand Down
2 changes: 1 addition & 1 deletion _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ repo:
this: https://github.com/cfug/flutter.cn
flutter: https://github.com/flutter/flutter
samples: https://github.com/flutter/samples
plugins: https://github.com/flutter/plugins
packages: https://github.com/flutter/packages
gallery: https://github.com/flutter/gallery
engine: https://github.com/flutter/engine
uxr: https://github.com/flutter/uxr
Expand Down
67 changes: 0 additions & 67 deletions cloudbuild.yaml

This file was deleted.

2 changes: 1 addition & 1 deletion examples/_animation/basic_hero_animation/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ description: >-
Shows how to create a simple or Hero animation using the Hero class directly.
environment:
sdk: ^3.1.0
sdk: ^3.2.0

dependencies:
flutter:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ description: >-
as it animates to the new route.
environment:
sdk: ^3.1.0
sdk: ^3.2.0

dependencies:
flutter:
Expand Down
2 changes: 1 addition & 1 deletion examples/_animation/basic_staggered_animation/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ publish_to: none
description: An introductory example to staggered animations.

environment:
sdk: ^3.1.0
sdk: ^3.2.0

dependencies:
flutter:
Expand Down
2 changes: 1 addition & 1 deletion examples/_animation/hero_animation/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ publish_to: none
description: Shows how to create a simple Hero transition.

environment:
sdk: ^3.1.0
sdk: ^3.2.0

dependencies:
flutter:
Expand Down
2 changes: 1 addition & 1 deletion examples/_animation/radial_hero_animation/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ class RadialExpansionDemo extends StatelessWidget {
Text(
description,
style: const TextStyle(fontWeight: FontWeight.bold),
textScaleFactor: 3,
textScaler: const TextScaler.linear(3),
),
const SizedBox(height: 16),
],
Expand Down
2 changes: 1 addition & 1 deletion examples/_animation/radial_hero_animation/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ description: >-
as it animates to the new route.
environment:
sdk: ^3.1.0
sdk: ^3.2.0

dependencies:
flutter:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ class RadialExpansionDemo extends StatelessWidget {
Text(
description,
style: const TextStyle(fontWeight: FontWeight.bold),
textScaleFactor: 3,
textScaler: const TextScaler.linear(3),
),
const SizedBox(height: 16),
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ description: >-
as it animates to the new route.
environment:
sdk: ^3.1.0
sdk: ^3.2.0

dependencies:
flutter:
Expand Down
2 changes: 1 addition & 1 deletion examples/_animation/staggered_pic_selection/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ publish_to: none
description: A more complex staggered animation example.

environment:
sdk: ^3.1.0
sdk: ^3.2.0

dependencies:
flutter:
Expand Down
4 changes: 2 additions & 2 deletions examples/animation/animate0/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@ description: >-
version: 1.0.0

environment:
sdk: ^3.1.0
sdk: ^3.2.0

dependencies:
flutter:
sdk: flutter
cupertino_icons: ^1.0.5
cupertino_icons: ^1.0.6

dev_dependencies:
example_utils:
Expand Down
4 changes: 2 additions & 2 deletions examples/animation/animate1/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@ description: >-
version: 1.0.0

environment:
sdk: ^3.1.0
sdk: ^3.2.0

dependencies:
flutter:
sdk: flutter
cupertino_icons: ^1.0.5
cupertino_icons: ^1.0.6

dev_dependencies:
example_utils:
Expand Down
4 changes: 2 additions & 2 deletions examples/animation/animate2/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@ description: >-
version: 1.0.0

environment:
sdk: ^3.1.0
sdk: ^3.2.0

dependencies:
flutter:
sdk: flutter
cupertino_icons: ^1.0.5
cupertino_icons: ^1.0.6

dev_dependencies:
example_utils:
Expand Down
4 changes: 2 additions & 2 deletions examples/animation/animate3/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@ description: >-
version: 1.0.0

environment:
sdk: ^3.1.0
sdk: ^3.2.0

dependencies:
flutter:
sdk: flutter
cupertino_icons: ^1.0.5
cupertino_icons: ^1.0.6

dev_dependencies:
example_utils:
Expand Down
4 changes: 2 additions & 2 deletions examples/animation/animate4/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@ description: >-
version: 1.0.0

environment:
sdk: ^3.1.0
sdk: ^3.2.0

dependencies:
flutter:
sdk: flutter
cupertino_icons: ^1.0.5
cupertino_icons: ^1.0.6

dev_dependencies:
example_utils:
Expand Down
4 changes: 2 additions & 2 deletions examples/animation/animate5/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@ description: >-
version: 1.0.0

environment:
sdk: ^3.1.0
sdk: ^3.2.0

dependencies:
flutter:
sdk: flutter
cupertino_icons: ^1.0.5
cupertino_icons: ^1.0.6

dev_dependencies:
example_utils:
Expand Down
Loading

0 comments on commit e7806d3

Please sign in to comment.