File tree Expand file tree Collapse file tree 3 files changed +11
-20
lines changed Expand file tree Collapse file tree 3 files changed +11
-20
lines changed Original file line number Diff line number Diff line change @@ -11,20 +11,11 @@ echo " User ${DEPLOY_SSH_USER}" >> ~/.ssh/config
11
11
echo " IdentityFile ~/.ssh/id_ed25519" >> ~ /.ssh/config
12
12
echo " IdentitiesOnly yes" >> ~ /.ssh/config
13
13
14
- src=$( dirname $0 ) /esmd.go
15
- if [ ! -f \$ src ]; then
16
- echo " package main" >> $src
17
- echo " import \" github.com/esm-dev/esm.sh/server\" " >> $src
18
- echo " func main() { server.Serve() }" >> $src
19
- fi
20
-
21
14
echo " --- building server..."
22
- go build -ldflags=" -s -w -X 'github.com/esm-dev/esm.sh/server.VERSION=${SERVER_VERSION} '" -o esmd $src
15
+ go build -ldflags=" -s -w -X 'github.com/esm-dev/esm.sh/server.VERSION=${SERVER_VERSION} '" -o esmd $( dirname $0 ) /../server/esmd/main.go
23
16
if [ " $? " != " 0" ]; then
24
- rm -f $src
25
17
exit 1
26
18
fi
27
- rm -f $src
28
19
du -h esmd
29
20
30
21
echo " --- uploading server build..."
Original file line number Diff line number Diff line change @@ -48,22 +48,13 @@ if [ "$v" != "" ]; then
48
48
sshPort=" $v "
49
49
fi
50
50
51
- src=$( dirname $0 ) /esmd.go
52
- if [ ! -f \$ src ]; then
53
- echo " package main" >> $src
54
- echo " import \" github.com/esm-dev/esm.sh/server\" " >> $src
55
- echo " func main() { server.Serve() }" >> $src
56
- fi
57
-
58
51
echo " --- building(${goos} _$goarch )..."
59
52
export GOOS=$goos
60
53
export GOARCH=$goarch
61
- go build -ldflags=" -s -w" -o esmd $src
54
+ go build -ldflags=" -s -w" -o esmd $( dirname $0 ) /../server/esmd/main.go
62
55
if [ " $? " != " 0" ]; then
63
- rm -f $src
64
56
exit
65
57
fi
66
- rm -f $src
67
58
du -h esmd
68
59
69
60
echo " --- uploading..."
Original file line number Diff line number Diff line change
1
+ package main
2
+
3
+ import (
4
+ "github.com/esm-dev/esm.sh/server"
5
+ )
6
+
7
+ func main () {
8
+ server .Serve ()
9
+ }
You can’t perform that action at this time.
0 commit comments