Skip to content
This repository has been archived by the owner on Aug 28, 2024. It is now read-only.

Commit

Permalink
Update dependencies and fix the build (#88)
Browse files Browse the repository at this point in the history
  • Loading branch information
timburks authored Jun 25, 2023
1 parent 558858c commit 6445a6c
Show file tree
Hide file tree
Showing 9 changed files with 146 additions and 131 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/flutter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
- name: Install Flutter tools
uses: subosito/flutter-action@v2
with:
flutter-version: '3.7.0'
flutter-version: '3.10.5'
channel: 'stable'
- name: Add Flutter .pub-cache to PATH
run: |
Expand Down
2 changes: 1 addition & 1 deletion apps/reg/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ dependencies:
registry:
path: ../../registry
archive: ^3.0.0
http: ^0.13.0
http: ^1.0.0
grpc: ^3.0.0

dev_dependencies:
Expand Down
6 changes: 3 additions & 3 deletions registry/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ environment:
sdk: ">=2.12.0 <3.0.0"

dependencies:
grpc: ^3.0.0
http: ^0.13.1
protobuf: ^2.0.0
grpc: ^3.2.1
http: ^1.0.0
protobuf: ^3.0.0
yaml: ^3.1.1
27 changes: 16 additions & 11 deletions site/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,32 +12,37 @@
# See the License for the specific language governing permissions and
# limitations under the License.

# This Dockerfile builds an image that runs the web server.
ARG FLUTTER_VERSION=3.7.0
ARG FLUTTER_VERSION=3.10.5
ARG PROTOBUF_VERSION=3.20.1
ARG GO_VERSION=1.18
ARG GO_VERSION=1.20

FROM ubuntu:latest as flutter
ARG FLUTTER_VERSION
ARG PROTOBUF_VERSION

ENV PATH "$PATH:/flutter/bin:/flutter/.pub-cache/bin"
ENV PATH "$PATH:/flutter/bin:/root/.pub-cache/bin"

WORKDIR /app

COPY . ./

RUN apt-get update -y && apt-get install curl unzip xz-utils git make -y && \
PB_REL="https://github.com/protocolbuffers/protobuf/releases" && \
RUN apt-get update -y && apt-get install curl unzip xz-utils git make -y

RUN PB_REL="https://github.com/protocolbuffers/protobuf/releases" && \
curl -LO $PB_REL/download/v${PROTOBUF_VERSION}/protoc-${PROTOBUF_VERSION}-linux-x86_64.zip && \
unzip protoc-${PROTOBUF_VERSION}-linux-x86_64.zip -d /usr/local

RUN curl -LO https://storage.googleapis.com/flutter_infra_release/releases/stable/linux/flutter_linux_${FLUTTER_VERSION}-stable.tar.xz && \
tar -xf flutter_linux_${FLUTTER_VERSION}-stable.tar.xz -C / && \
git config --global --add safe.directory /flutter && \
flutter pub global activate protoc_plugin && \
flutter config --enable-web && \
make create && make protos && make staging
tar -xf flutter_linux_${FLUTTER_VERSION}-stable.tar.xz -C /

RUN git config --global --add safe.directory /flutter

RUN flutter pub global activate protoc_plugin

RUN flutter config --enable-web
RUN make create
RUN make protos
RUN make staging

# Use the official Golang image to create a build artifact.
# This is based on Debian and sets the GOPATH to /go.
Expand Down
4 changes: 2 additions & 2 deletions third_party/SETUP.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@ if [ ! -d "api-common-protos" ]
then
git clone https://github.com/googleapis/api-common-protos
else
echo "Using previous download of third_party/api-common-protos."
echo "Using previous download of googleapis/api-common-protos."
fi

if [ ! -d "gnostic" ]
then
git clone https://github.com/google/gnostic
else
echo "Using previous download of third_party/gnostic."
echo "Using previous download of google/gnostic."
fi

if [ ! -d "registry" ]
Expand Down
9 changes: 5 additions & 4 deletions viewer/lib/service/registry.dart
Original file line number Diff line number Diff line change
Expand Up @@ -175,10 +175,11 @@ class ProjectManager extends ResourceManager<Project> {
if (adminClient != null) {
return adminClient.getProject(request, options: callOptions());
}
return Future.value(Project(
name: name,
displayName: name?.replaceAll("projects/", "").capitalize(),
));
return Future.value(
Project()
..name = name!
..displayName = name!.replaceAll("projects/", "").capitalize(),
);
}

void update(Project newValue, List<String> paths, Function onError) {
Expand Down
4 changes: 2 additions & 2 deletions viewer/lib/service/service.dart
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ class StatusService {
try {
final client = getAdminClient();
if (client == null) {
return Future.value(Status(message: "ok"));
return Future.value(Status()..message = "ok");
}
return client.getStatus(Empty(), options: callOptions());
} catch (err) {
Expand Down Expand Up @@ -84,7 +84,7 @@ class ProjectService {
Future<Project>? getProject(String name) {
final client = getAdminClient();
if (client == null) {
return Future.value(Project(name: name));
return Future.value(Project()..name = name);
}
final request = GetProjectRequest();
request.name = name;
Expand Down
Loading

0 comments on commit 6445a6c

Please sign in to comment.