Skip to content

Commit

Permalink
Merge pull request #331 from canonical/main
Browse files Browse the repository at this point in the history
feat: merge the latest changes from `main` into `bootstrap-snap`
  • Loading branch information
d-loose authored Jan 18, 2024
2 parents 82fdaf0 + 69b778a commit bd9a97f
Show file tree
Hide file tree
Showing 158 changed files with 7,327 additions and 1,482 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ jobs:
uses: actions/checkout@v4

- name: Set up Go
uses: actions/setup-go@v4
uses: actions/setup-go@v5
with:
go-version-file: "./provd/go.mod"

Expand Down
2 changes: 1 addition & 1 deletion .gitmodules
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[submodule "subiquity"]
path = packages/subiquity_client/subiquity
url = https://github.com/canonical/subiquity.git
branch = ubuntu/mantic
branch = main
2 changes: 1 addition & 1 deletion .tool-versions
Original file line number Diff line number Diff line change
@@ -1 +1 @@
flutter 3.16.3-stable
flutter 3.16.4-stable
83 changes: 35 additions & 48 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,67 +2,54 @@

[![CI](https://github.com/canonical/ubuntu-desktop-provision/actions/workflows/ci.yml/badge.svg)](https://github.com/canonical/ubuntu-desktop-provision/actions/workflows/ci.yml)
[![codecov](https://codecov.io/gh/canonical/ubuntu-desktop-provision/branch/main/graph/badge.svg?token=JcedDc47dU)](https://codecov.io/gh/canonical/ubuntu-desktop-provision)
[![weblate](https://hosted.weblate.org/widget/ubuntu-desktop-installer/svg-badge.svg)](https://hosted.weblate.org/engage/ubuntu-desktop-installer/)
[![screenshots](https://img.shields.io/badge/screenshots-gray?logo=ubuntu)](https://github.com/canonical/ubuntu-desktop-provision-screenshots)

```mermaid
classDiagram
ubuntu_bootstrap <|-- ubuntu_desktop_installer
ubuntu_bootstrap <|-- ubuntu_flavor_installer
ubuntu_init <|-- ubuntu_core_desktop_init
ubuntu_init <|-- ubuntu_welcome
ubuntu_provision <|-- ubuntu_bootstrap
ubuntu_provision <|-- ubuntu_init
ubuntu_provision: - shared pages
ubuntu_provision: - service interfaces
ubuntu_bootstrap: - subiquity-based services
ubuntu_bootstrap: - configurable subset of pages
ubuntu_init: - xdg/dbus/gsettings-based services
ubuntu_init: - configurable subset of pages
ubuntu_desktop_installer: - (main.dart)
ubuntu_desktop_installer: - snapcraft.yaml
ubuntu_flavor_installer: - (main.dart)
ubuntu_flavor_installer: - snapcraft.yaml
ubuntu_core_desktop_init: - (main.dart)
ubuntu_core_desktop_init: - snapcraft.yaml
ubuntu_welcome: - (main.dart)
ubuntu_welcome: - snapcraft.yaml
```

## Used by

- [Ubuntu Desktop Installer](https://github.com/canonical/ubuntu-desktop-installer)
- [Ubuntu Flavor Installer](https://github.com/canonical/ubuntu-flavor-installer)
- [Ubuntu Core Desktop Init](https://github.com/canonical/ubuntu-core-desktop-init)
- [Ubuntu Welcome](https://github.com/canonical/ubuntu-welcome)
## Bugs

## Configuration

Supported formats:
- [YAML](https://yaml.org/) (`.yaml`, `.yml`)
Please report any bugs related to Ubuntu Desktop Provision on [Launchpad](https://bugs.launchpad.net/ubuntu-desktop-provision).
We use the GitHub issue tracker only for issues related to the development of Ubuntu Desktop Provision itself.

```yaml
bootstrap:
pages:
- locale
- keyboard
- source
- storage
## Configuration

init:
pages:
- timezone
- identity
```
The Flutter UI can be configured using a [YAML](https://yaml.org/) file.
```yaml
theme:
accent-color: "#ff0000"
elevated-button-color: "#00ff00"
elevated-button-text-color: "#0000ff"
window-title: "Custom Window Title"

pages:
locale:
title: "Custom Title for Locale Page"
image: "/path/to/image.png"
visible: true
...
```

Lookup order:
- `/etc/ubuntu-provision.{yaml,yml}` (admin)
- `/usr/local/share/ubuntu-provision.{yaml,yml}` (oem)
- `/usr/share/ubuntu-provision.{yaml,yml}` (distro)

## Repository Structure

### Frontend

The UI is written in [Flutter](https://flutter.dev/) and consists of multiple Dart/Flutter packages contained in `packages/`. The most important ones are:
* `ubuntu_bootstrap` - Flutter UI that drives `subiquity` in the 'device bootstrap' stage. This is the core of the `ubuntu-desktop-bootstrap` snap built from the `bootstrap-snap` branch and replaces the `ubuntu-desktop-installer`.
* `ubuntu_init` - Flutter UI that drives `provd` in the 'first boot initialization' stage. This is the core of the `ubuntu-desktop-init` snap built from the `init-snap` branch and serves as a replacement for `gnome-initial-setup`.
* `ubuntu_provision` - Flutter package that contains shared code and pages used by both `ubuntu_bootstrap` and `ubuntu_init`.
* `ubuntu_wizard` - Flutter package that provides the common wizard-style UI framework.
* `subiquity_client` and `provd_client` - Dart packages that provide a client library for the different backends.

### Backend

TODO

## Translations

This project is being translated using [Weblate](https://hosted.weblate.org/engage/ubuntu-desktop-installer/), a web tool designed to ease translating for both developers and translators.
TODO

## Contributing

Expand Down
5 changes: 0 additions & 5 deletions codecov.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,4 @@
comment: false
ignore:
- "**/*.freezed.dart"
- "**/*.g.dart"
- "**/*.mocks.dart"
- "**/l10n/*.dart"

coverage:
precision: 2
Expand Down
15 changes: 11 additions & 4 deletions melos.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ command:
ubuntu_logger: ^0.1.0
ubuntu_service: ^0.3.0
ubuntu_session: ^0.0.4
ubuntu_widgets: ^0.3.0
ubuntu_widgets: ^0.3.2
udev: ^0.0.3
upower: ^0.7.0
url_launcher: ^6.2.1
Expand Down Expand Up @@ -86,16 +86,23 @@ scripts:
# cleanup generated files from coverage
coverage:cleanup: >
melos exec --file-exists=coverage/lcov.info -- \
lcov --remove coverage/lcov.info '**/*.g.dart' '**/*.freezed.dart' -o coverage/lcov.info
lcov --remove coverage/lcov.info \
'**/*.freezed.dart' \
'**/*.g.dart' \
'**/*.mocks.dart' \
'**/l10n/*.dart' \
'**/*.pb*.dart' \
-o coverage/lcov.info

# format all packages
format: >
melos exec -c 1 -- \
"find $MELOS_PACKAGE_PATH -name '*.dart' \
! -name '*.g.dart' \
! -name '*.freezed.dart' \
! -name '*.pb*.dart' \
! -name '*.g.dart' \
! -name '*.mocks.dart' \
! -path '*/l10n/*' \
! -name '*.pb*.dart' \
! -path '*/.*/*' \
| xargs dart format --set-exit-if-changed"
Expand Down
Loading

0 comments on commit bd9a97f

Please sign in to comment.