Remove skygo

We no longer use sky_server.go. This patch removes it.
This commit is contained in:
Adam Barth 2015-07-27 16:11:15 -07:00
parent fe3e5344a2
commit b1ee1648ae
6 changed files with 0 additions and 158 deletions

23
DEPS
View File

@ -241,29 +241,6 @@ hooks = [
'-s', 'src/buildtools/mac/clang-format.sha1',
],
},
# Pull sky_server binaries using checked-in hashes.
{
'name': 'sky_server_linux',
'pattern': '.',
'action': [ 'download_from_google_storage',
'--no_resume',
'--platform=linux*',
'--no_auth',
'--bucket', 'mojo',
'-s', 'src/sky/tools/skygo/linux64/sky_server.sha1',
],
},
{
'name': 'sky_server_mac',
'pattern': '.',
'action': [ 'download_from_google_storage',
'--no_resume',
'--platform=darwin',
'--no_auth',
'--bucket', 'mojo',
'-s', 'src/sky/tools/skygo/mac/sky_server.sha1',
],
},
{
'name': 'material_design_icons',
'pattern': '.',

View File

@ -17,7 +17,6 @@ cscope.*
Session.vim
tags
Thumbs.db
v8.log
/build/util/LASTCHANGE*
.idea
@ -75,7 +74,6 @@ v8.log
/third_party/yasm/binaries/
/third_party/yasm/source/patched-yasm/
/tools/grit/
/v8/
# dart packages directories and related.
/mojo/dart/apptest/packages
@ -84,16 +82,4 @@ v8.log
/mojo/dart/mojom/bin/packages
/mojo/dart/mojom/packages
/mojo/dart/mojom/test/packages
/sky/examples/hello_world/packages
/sky/examples/stocks/packages
/sky/sdk/packages/mojo/packages
/sky/sdk/packages/mojo/pubspec.lock
/sky/sdk/packages/sky/packages
/sky/sdk/packages/sky/pubspec.lock
# sky tools
/sky/tools/skygo/linux64/sky_server
/sky/tools/skygo/mac/sky_server
# downloaded keyboard_native resources.
/services/keyboard_native/res/*.png

View File

@ -1,19 +0,0 @@
sky_server instructions
=======================
Building locally:
1. cd sky/tools/skygo/linux64 (or your current platform)
2. go build ../sky_server.go
Testing locally:
1. Build as per the above steps
2. Run test_sky --path-to-server /absolute/path/to/sky/tools/skygo/sky_server
Uploading the locally built server
1. cd sky/tools/skygo/linux64
2. upload_to_google_storage.py --bucket mojo sky_server
upload_to_google_storage.py is in depot_tools. It will overwrite
sky_server.sha1. Include that change in your code review.
linux64/sky_server was last built using go version go1.4.2 linux/amd64.

View File

@ -1 +0,0 @@
925b384cf8e1fa916c51711fd462e85f5f4ad13d

View File

@ -1 +0,0 @@
2c6e5b1818562f98d2697a6c27e16595c0592f41

View File

@ -1,100 +0,0 @@
// Copyright (c) 2014 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
package main
import (
"flag"
"fmt"
"io/ioutil"
"net/http"
"os"
"path"
"path/filepath"
"strings"
)
var verbose bool = false;
type skyHandlerRoot struct {
root string
}
func skyHandler(root string) http.Handler {
return &skyHandlerRoot{root}
}
func (handler *skyHandlerRoot) ServeHTTP(w http.ResponseWriter, r *http.Request) {
if strings.HasPrefix(r.URL.Path, "/.git") {
w.WriteHeader(http.StatusNotFound)
return
}
path := path.Join(handler.root, r.URL.Path)
// Remove this one once .sky files are gone:
if strings.HasSuffix(path, ".sky") {
w.Header().Set("Content-Type", "text/sky")
}
if strings.HasSuffix(path, ".dart") {
w.Header().Set("Content-Type", "application/dart")
}
w.Header().Set("Cache-Control", "no-cache")
http.ServeFile(w, r, path)
}
func usage() {
fmt.Fprintf(os.Stderr, "Usage: sky_server [flags] MOJO_SRC_ROOT PACKAGE_ROOT\n")
fmt.Fprintf(os.Stderr, "Launches a basic http server with mappings into the mojo repository for framework/service paths.\n")
fmt.Fprintf(os.Stderr, "MOJO_SRC_ROOT must be the root of the Mojo repository.\n")
fmt.Fprintf(os.Stderr, "PACKAGE_ROOT must be the root of your Dart packages (e.g. out/Debug/gen/dart-pkg/packages/).\n")
flag.PrintDefaults()
os.Exit(2)
}
func addMapping(from_path string, to_path string) {
if (verbose) {
fmt.Fprintf(os.Stderr, " %s -> %s\n", from_path, to_path)
}
http.Handle(from_path, http.StripPrefix(from_path, skyHandler(to_path)))
}
func setupMappings(mojoRoot string, packageRoot string, port int) {
if (verbose) {
fmt.Fprintf(os.Stderr, "Mappings for localhost:%v:\n", port)
fmt.Fprintf(os.Stderr, " / -> %s\n", mojoRoot)
}
http.Handle("/", skyHandler(mojoRoot))
if (verbose) {
fmt.Fprintf(os.Stderr, " /echo_post -> custom echo handler\n")
}
http.HandleFunc("/echo_post", func(w http.ResponseWriter, r *http.Request) {
defer r.Body.Close()
body, _ := ioutil.ReadAll(r.Body)
w.Write(body)
})
addMapping("/packages/", packageRoot)
}
func main() {
var portPtr = flag.Int("p", 8000, "The HTTP port")
var verbosePtr = flag.Bool("v", false, "Verbose mode. Without this flag, the default behaviour only reports errors.")
flag.Parse()
flag.Usage = usage
if flag.NArg() != 2 {
usage()
}
var port int = *portPtr;
verbose = *verbosePtr;
root, _ := filepath.Abs(flag.Arg(0))
packageRoot := flag.Arg(1)
setupMappings(root, packageRoot, port);
http.ListenAndServe(fmt.Sprintf(":%v", port), nil)
}