Skip to content

Commit

Permalink
Update Android versions and deps, Go 1.18 support (#5)
Browse files Browse the repository at this point in the history
  • Loading branch information
nezorflame authored Sep 12, 2022
1 parent efe478f commit 1a850ee
Show file tree
Hide file tree
Showing 12 changed files with 304 additions and 223 deletions.
8 changes: 4 additions & 4 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
version: 2

jobs:
test:
docker:
- image: circleci/golang:1.13
working_directory: /go/src/github.com/opengapps/package-api
- image: cimg/go:1.19
steps:
- checkout
- restore_cache:
Expand All @@ -20,8 +20,7 @@ jobs:
- /go/pkg/mod/cache/download/
lint:
docker:
- image: golangci/golangci-lint:v1.23
working_directory: /go/src/github.com/opengapps/package-api
- image: golangci/golangci-lint:v1.49
steps:
- checkout
- restore_cache:
Expand All @@ -32,6 +31,7 @@ jobs:
- run:
name: Lint
command: make lint

workflows:
version: 2
test_and_lint:
Expand Down
8 changes: 2 additions & 6 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,16 +32,12 @@ linters:
- revive
- govet
- errcheck
- deadcode
- structcheck
- varcheck
- ineffassign
- typecheck
- dupl
- goconst
- gosec
- staticcheck # (ex-megacheck)
# - goimports - IDE should do this automatically as 'On save' action
# - staticcheck # not for 1.18

issues:
exclude-use-default: false
Expand All @@ -53,7 +49,7 @@ issues:
# can be removed in the development phase
# - (comment on exported (method|function|type|const)|should have( a package)? comment|comment should be of the form)
# not for the active development - can be removed in the stable phase
- should have a package comment, unless it's in another file for this package
- "package-comments: should have a package comment"
# - don't use an underscore in package name
# errcheck: Almost all programs ignore errors on these functions and in most cases it's ok
- Error return value of .((os\.)?std(out|err)\..*|.*Close|.*Flush|os\.Remove(All)?|.*printf?|os\.(Un)?Setenv|.*Rollback). is not checked
Expand Down
3 changes: 1 addition & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ APP_VERSION?=$(if $(GIT_TAG),$(GIT_TAG),$(shell git describe --all --long HEAD 2
GO_VERSION:=$(shell go version)
GO_VERSION_SHORT:=$(shell echo $(GO_VERSION)|sed -E 's/.* go(.*) .*/\1/g')

export GO111MODULE=on
export GOPROXY=https://proxy.golang.org
BUILD_ENVPARMS:=CGO_ENABLED=0
BUILD_TS:=$(shell date +%FT%T%z)
Expand Down Expand Up @@ -60,4 +59,4 @@ run:

.PHONY: lint
lint:
golangci-lint run --config=.golangci.yml ./...
golangci-lint run --config=.golangci.yml --timeout=5m ./...
41 changes: 34 additions & 7 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,20 +1,47 @@
module github.com/opengapps/package-api

go 1.13
go 1.18

require (
github.com/google/go-github/v37 v37.0.0
github.com/google/go-github/v47 v47.0.0
github.com/gorilla/feeds v1.1.1
github.com/gorilla/handlers v1.5.1
github.com/gorilla/mux v1.8.0
github.com/opengapps/package-api/pkg/gapps v1.0.0
github.com/sirupsen/logrus v1.8.1
github.com/sirupsen/logrus v1.9.0
github.com/spf13/pflag v1.0.5
github.com/spf13/viper v1.8.1
github.com/stretchr/testify v1.7.0
github.com/spf13/viper v1.13.0
github.com/stretchr/testify v1.8.0
go.etcd.io/bbolt v1.3.6
golang.org/x/oauth2 v0.0.0-20210628180205-a41e5a781914
golang.org/x/sync v0.0.0-20210220032951-036812b2e83c
golang.org/x/oauth2 v0.0.0-20220909003341-f21342109be1
golang.org/x/sync v0.0.0-20220907140024-f12130a52804
)

require (
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/felixge/httpsnoop v1.0.3 // indirect
github.com/fsnotify/fsnotify v1.5.4 // indirect
github.com/golang/protobuf v1.5.2 // indirect
github.com/google/go-querystring v1.1.0 // indirect
github.com/hashicorp/hcl v1.0.0 // indirect
github.com/magiconair/properties v1.8.6 // indirect
github.com/mitchellh/mapstructure v1.5.0 // indirect
github.com/pelletier/go-toml v1.9.5 // indirect
github.com/pelletier/go-toml/v2 v2.0.5 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/spf13/afero v1.9.2 // indirect
github.com/spf13/cast v1.5.0 // indirect
github.com/spf13/jwalterweatherman v1.1.0 // indirect
github.com/subosito/gotenv v1.4.1 // indirect
golang.org/x/crypto v0.0.0-20220829220503-c86fa9a7ed90 // indirect
golang.org/x/net v0.0.0-20220909164309-bea034e7d591 // indirect
golang.org/x/sys v0.0.0-20220909162455-aba9fc2a8ff2 // indirect
golang.org/x/text v0.3.7 // indirect
google.golang.org/appengine v1.6.7 // indirect
google.golang.org/protobuf v1.28.1 // indirect
gopkg.in/ini.v1 v1.67.0 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
)

replace github.com/opengapps/package-api/pkg/gapps => ./pkg/gapps
240 changes: 71 additions & 169 deletions go.sum

Large diffs are not rendered by default.

6 changes: 6 additions & 0 deletions go.work
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
go 1.18

use (
.
./pkg/gapps
)
93 changes: 78 additions & 15 deletions pkg/gapps/android_enumer.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions pkg/gapps/gapps.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ const (
Android90
Android100
Android110
Android120
Android121
)

// HumanString is required for human-readable Android version with . delimiter
Expand Down
2 changes: 1 addition & 1 deletion pkg/gapps/go.mod
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module github.com/opengapps/package-api/pkg/gapps

go 1.13
go 1.18
46 changes: 40 additions & 6 deletions pkg/gapps/platform_enumer.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 1a850ee

Please sign in to comment.