Skip to content

Commit

Permalink
cleanup: remove go-bindata
Browse files Browse the repository at this point in the history
  • Loading branch information
JacksonTian committed Sep 24, 2021
1 parent 9c75837 commit 21c9f6f
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 13 deletions.
2 changes: 0 additions & 2 deletions .appveyor.yml
Expand Up @@ -14,8 +14,6 @@ install:
- cmd: git submodule update --init --recursive
- cmd: set path=%path%;C:\Users\appveyor\go\bin
- cmd: set VERSION=3.0.0-beta
- cmd: go get -u github.com/shuLhan/go-bindata/...
- cmd: go-bindata -o resource/metas.go -pkg resource ./aliyun-openapi-meta/...
- cmd: go build -ldflags "-X 'github.com/aliyun/aliyun-cli/cli.Version=%VERSION%'" -o C:\Users\appveyor\go\bin\aliyun.exe main/main.go

# build platform, i.e. x86, x64, Any CPU. This setting is optional.
Expand Down
10 changes: 1 addition & 9 deletions Makefile
Expand Up @@ -6,19 +6,11 @@ publish: build build_mac build_linux build_windows build_linux_arm64 gen_version

deps:
git submodule update
go get -u github.com/shuLhan/go-bindata/...
go mod tidy

testdeps: deps

metas: deps
go-bindata -o resource/metas.go -pkg resource ./aliyun-openapi-meta/...

clean:
rm -f resource/metas.go
rm -rf out/*

build: metas
build: deps
go build -ldflags "-X 'github.com/aliyun/aliyun-cli/cli.Version=${VERSION}'" -o out/aliyun main/main.go

install: build
Expand Down
2 changes: 1 addition & 1 deletion aliyun-openapi-meta
Submodule aliyun-openapi-meta updated 3 files
+6 −0 meta.go
+0 −8,676 products.json
+0 −1,125 versions.json
6 changes: 5 additions & 1 deletion resource/reader.go
Expand Up @@ -13,6 +13,10 @@
// limitations under the License.
package resource

import (
aliyunopenapimeta "github.com/aliyun/aliyun-cli/aliyun-openapi-meta"
)

type Reader struct {
}

Expand All @@ -21,5 +25,5 @@ func NewReader() *Reader {
}

func (r *Reader) ReadFrom(path string) ([]byte, error) {
return Asset("aliyun-openapi-meta/metadatas/" + path)
return aliyunopenapimeta.Metadatas.ReadFile("metadatas/" + path)
}

0 comments on commit 21c9f6f

Please sign in to comment.