-
Notifications
You must be signed in to change notification settings - Fork 493
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
commit 26b458a Author: Feodor Fitsner <[email protected]> Date: Sun Mar 27 16:47:45 2022 -0700 why flet? commit 4fb4bdf Author: Feodor Fitsner <[email protected]> Date: Sun Mar 27 16:47:33 2022 -0700 Logo scetches. commit 77eb466 Author: Feodor Fitsner <[email protected]> Date: Sat Mar 26 16:14:43 2022 -0700 Remove "internal" commit ffb35b2 Author: Feodor Fitsner <[email protected]> Date: Sat Mar 26 13:57:47 2022 -0700 Try cd .. commit b98318b Author: Feodor Fitsner <[email protected]> Date: Sat Mar 26 13:49:14 2022 -0700 Skip Windows ARM builds commit 8e3ded3 Author: Feodor Fitsner <[email protected]> Date: Sat Mar 26 13:34:37 2022 -0700 Fix mkdir commit e1d4e02 Author: Feodor Fitsner <[email protected]> Date: Sat Mar 26 13:33:24 2022 -0700 Create fake index commit f881399 Author: Feodor Fitsner <[email protected]> Date: Sat Mar 26 13:31:19 2022 -0700 Fix utils package commit 7d9e068 Author: Feodor Fitsner <[email protected]> Date: Sat Mar 26 13:29:08 2022 -0700 GoReleaser v1.7.0 commit 6d407de Author: Feodor Fitsner <[email protected]> Date: Sat Mar 26 13:28:03 2022 -0700 Fix path to install_goreleaser.sh commit 1245023 Author: Feodor Fitsner <[email protected]> Date: Sat Mar 26 13:26:17 2022 -0700 Removed redunded logic commit 11dadca Author: Feodor Fitsner <[email protected]> Date: Sat Mar 26 12:43:39 2022 -0700 Some renames commit 5bd568f Author: Feodor Fitsner <[email protected]> Date: Sat Mar 26 12:40:51 2022 -0700 Flet Server added
- Loading branch information
1 parent
269d28d
commit ee6cb28
Showing
67 changed files
with
8,354 additions
and
3 deletions.
There are no files selected for viewing
This file contains 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,175 @@ | ||
skip_branch_with_pr: true | ||
|
||
environment: | ||
GO_VERSION: 1.18 | ||
GO_TAGS: --tags release | ||
GITHUB_TOKEN: | ||
secure: uX7wMPjOz72c6zs4QS2/m3vsOE5Fh7e68YqMNSf0mRmb6hP9Ij8haCefQjxBDlEb | ||
DOCKER_REGISTRY_USER: | ||
secure: NJVK0u9M6ZhmQKUeR6Gnxg== | ||
DOCKER_REGISTRY_PASS: | ||
secure: V9nRzVDlIGS0a+dhkC2/vw== | ||
|
||
matrix: | ||
# - job_name: Windows | ||
# job_group: tests | ||
# APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019 | ||
|
||
# - job_name: Linux | ||
# job_group: tests | ||
# APPVEYOR_BUILD_WORKER_IMAGE: Ubuntu | ||
|
||
# - job_name: macOS | ||
# job_group: tests | ||
# APPVEYOR_BUILD_WORKER_IMAGE: macOS | ||
|
||
- job_name: Release | ||
job_depends_on: tests | ||
APPVEYOR_BUILD_WORKER_IMAGE: Ubuntu | ||
|
||
matrix: | ||
fast_finish: true | ||
|
||
for: | ||
|
||
# ====================================== | ||
# Windows | ||
# ====================================== | ||
|
||
- | ||
matrix: | ||
only: | ||
- job_name: Windows | ||
|
||
install: | ||
- ps: .\install_go.ps1 | ||
- set GOPATH=%USERPROFILE%\go | ||
- set PATH=%GOPATH%\bin;%PATH% | ||
- echo %GOPATH% | ||
- echo %GOROOT% | ||
- go version | ||
|
||
build_script: | ||
- ps: Install-Product node 12 x64 | ||
- cd client | ||
- yarn | ||
- yarn build | ||
- cd .. | ||
- mkdir internal\server\content | ||
- xcopy client\build internal\server\content\ /E /Y | ||
- .\build.cmd | ||
- dir %USERPROFILE%\Go\bin | ||
|
||
test_script: | ||
- run-tests.cmd | ||
|
||
# ====================================== | ||
# Linux | ||
# ====================================== | ||
|
||
- | ||
matrix: | ||
only: | ||
- job_name: Linux | ||
|
||
install: | ||
- gvm install go${GO_VERSION} -B | ||
- gvm use go${GO_VERSION} | ||
- go version | ||
|
||
build_script: | ||
- nvm use 12 | ||
- cd client | ||
- yarn | ||
- yarn build | ||
- cd .. | ||
- mkdir server/content | ||
- cp -r client/build/* server/content | ||
- ./build.sh | ||
- ls $GOPATH/bin | ||
|
||
test_script: | ||
- ./run-tests.sh | ||
|
||
# ====================================== | ||
# macOS | ||
# ====================================== | ||
|
||
- | ||
matrix: | ||
only: | ||
- job_name: macOS | ||
|
||
install: | ||
- gvm install go${GO_VERSION} -B | ||
- gvm use go${GO_VERSION} | ||
- go version | ||
- HOMEBREW_NO_AUTO_UPDATE=1 brew install yarn | ||
|
||
build_script: | ||
- nvm use 14 | ||
- cd client | ||
- yarn | ||
- yarn build | ||
- cd .. | ||
- mkdir server/content | ||
- cp -r client/build/* server/content | ||
- ./build.sh | ||
- ls $GOPATH/bin | ||
|
||
test_script: | ||
- ./run-tests.sh | ||
|
||
# ====================================== | ||
# Release | ||
# ====================================== | ||
|
||
- | ||
matrix: | ||
only: | ||
- job_name: Release | ||
|
||
install: | ||
- gvm install go${GO_VERSION} -B | ||
- gvm use go${GO_VERSION} | ||
- go version | ||
- bash ./ci/install_goreleaser.sh | ||
- goreleaser --version | ||
# - sh: | | ||
# sudo snap install --classic goreleaser | ||
# goreleaser --version | ||
|
||
build_script: | ||
#- nvm use 12 | ||
#- cd client | ||
#- yarn | ||
#- GENERATE_SOURCEMAP=false yarn build | ||
#- ls -alR build | ||
#- cd .. | ||
#- cp -r client/build/* server/content | ||
- cd server | ||
- mkdir server/content | ||
- echo "Hello, world!" > server/content/index.html | ||
- sh: | | ||
if [[ "$APPVEYOR_REPO_TAG" == "true" ]]; then | ||
goreleaser | ||
else | ||
goreleaser --snapshot --skip-publish | ||
fi | ||
- cd .. | ||
|
||
test_script: | ||
- docker images | ||
- docker run --name flet-test -d flet/server | ||
- sleep 10 | ||
- docker logs flet-test | ||
|
||
# publish to docker.io on tagged builds only | ||
- sh: | | ||
if [[ "$APPVEYOR_REPO_TAG" == "true" ]]; then | ||
echo "$DOCKER_REGISTRY_PASS" | docker login --username $DOCKER_REGISTRY_USER --password-stdin | ||
docker image push --all-tags flet/server | ||
fi | ||
artifacts: | ||
- path: server/dist/flet-* |
This file contains 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,2 @@ | ||
# Auto detect text files and perform LF normalization | ||
* text=auto |
This file contains 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,18 @@ | ||
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files. | ||
# Binaries for programs and plugins | ||
*.exe | ||
*.exe~ | ||
*.dll | ||
*.so | ||
*.dylib | ||
|
||
# Test binary, built with `go test -c` | ||
*.test | ||
|
||
# Output of the go coverage tool, specifically when used with LiteIDE | ||
*.out | ||
|
||
# Dependency directories (remove the comment below to include it) | ||
# vendor/ | ||
|
||
server/content/ |
This file contains 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,7 +1,5 @@ | ||
# Flet | ||
|
||
Build Flutter apps in Python | ||
|
||
__Flet__ is the next iteration of [Pglet](https://github.com/pglet/pglet) project. | ||
Build Flutter apps in Python. | ||
|
||
|
This file contains 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,7 @@ | ||
Remove-Item 'C:\go' -Recurse -Force | ||
|
||
$goDistPath = "$env:TEMP\go$GO_VERSION.windows-amd64.zip" | ||
(New-Object Net.WebClient).DownloadFile("https://golang.org/dl/go$($env:GO_VERSION).windows-amd64.zip", $goDistPath) | ||
7z x $goDistPath -o"$env:SystemDrive\" | Out-Null | ||
|
||
go version |
This file contains 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 @@ | ||
GO_OS=linux | ||
if [[ "$OSTYPE" == "darwin"* ]]; then | ||
GO_OS=darwin | ||
fi | ||
|
||
curl -fsSL "https://golang.org/dl/go${GO_VERSION}.${GO_OS}-amd64.tar.gz" -o /tmp/go-linux-amd64.tar.gz | ||
sudo tar zxf /tmp/go-linux-amd64.tar.gz -C /usr/local | ||
export PATH=/usr/local/go/bin:$PATH | ||
export GOROOT=/usr/local/go | ||
export GOPATH=$HOME/go | ||
go version |
This file contains 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,2 @@ | ||
curl -fsSL https://github.com/goreleaser/goreleaser/releases/download/v1.7.0/goreleaser_Linux_x86_64.tar.gz -o /tmp/goreleaser_Linux_x86_64.tar.gz | ||
sudo tar zxf /tmp/goreleaser_Linux_x86_64.tar.gz -C /usr/local/bin |
This file contains 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,21 @@ | ||
# Flet - build real-time multi-platform apps in the language you know | ||
|
||
__Flet__ is the next iteration of [Pglet](https://github.com/pglet/pglet) project. | ||
|
||
Pglet demonostrated there is a strong interest to write web apps in Python. | ||
|
||
## Why new project? | ||
|
||
Pglet is for web apps and is based on Fluent UI React components. | ||
|
||
Flet is for web, desktop and mobile platforms and is based on Flutter. | ||
|
||
A lot of renamings would create a mess in a project repo - it's easier to start over in a new repository. | ||
|
||
A lot of functionality was added to support Bash: a custom protocol via named pipes with commands serialization/deserialization, CLI support with `pglet page` and `pglet app` commands. It's not necessary anymore with high level languages such like Python which communicate with Flet server via WebSockets directly. | ||
|
||
With Flet we are switching to monorepo storing Flet server, Flutter client and all language bindings (SDKs). Every CI build and release creates the same, unique version for all the apps and components. | ||
|
||
## Why changing name? | ||
|
||
* Confusing name. It's been almost a year and I haven't used to the name yet. Is it a "page-let", "p-g-let" or "piglet"? Is there connection to "PostgreSQL" or Paul Graham? On the other hand "flet" is short, simple and easy to pronounce. |
Binary file not shown.
This file contains 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,73 @@ | ||
project_name: flet | ||
|
||
builds: | ||
- id: flet | ||
main: cmd/flet/main.go | ||
binary: flet | ||
env: | ||
- CGO_ENABLED=0 | ||
flags: | ||
- -tags=release | ||
ldflags: | ||
- -s -w -X github.com/flet-dev/flet/server/commands.version={{.Version}} | ||
goos: | ||
- linux | ||
- darwin | ||
- windows | ||
goarch: | ||
- amd64 | ||
- arm64 | ||
- arm | ||
goarm: | ||
- 7 | ||
ignore: | ||
- goos: windows | ||
goarch: arm64 | ||
- goos: windows | ||
goarch: arm | ||
|
||
dockers: | ||
- | ||
ids: | ||
- flet | ||
|
||
goos: linux | ||
goarch: amd64 | ||
goarm: '' | ||
|
||
image_templates: | ||
- "flet/server:latest" | ||
- "flet/server:{{ .Version }}" | ||
- "us.gcr.io/flet-app/flet-server:{{ .Version }}" | ||
|
||
skip_push: true | ||
dockerfile: Dockerfile | ||
use: buildx | ||
|
||
# Template of the docker build flags. | ||
build_flag_templates: | ||
- "--pull" | ||
- "--label=org.opencontainers.image.created={{.Date}}" | ||
- "--label=org.opencontainers.image.title={{.ProjectName}}" | ||
- "--label=org.opencontainers.image.revision={{.FullCommit}}" | ||
- "--label=org.opencontainers.image.version={{.Version}}" | ||
#- "--build-arg=FOO={{.Env.Bar}}" | ||
- "--platform=linux/amd64" | ||
|
||
archives: | ||
- id: flet-binaries | ||
builds: | ||
- flet | ||
format: binary | ||
name_template: "flet-{{ .Version }}-{{ .Os }}-{{ .Arch }}" | ||
- | ||
id: flet-tars | ||
builds: | ||
- flet | ||
name_template: "flet-{{ .Version }}-{{ .Os }}-{{ .Arch }}" | ||
format_overrides: | ||
- goos: windows | ||
format: zip | ||
|
||
release: | ||
prerelease: auto |
This file contains 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,6 @@ | ||
FROM gcr.io/distroless/base | ||
ENV FLET_SERVER_PORT=8080 | ||
ENV FLET_ALLOW_REMOTE_HOST_CLIENTS=true | ||
EXPOSE 8080 | ||
COPY flet / | ||
ENTRYPOINT [ "/flet", "server" ] |
Oops, something went wrong.