Skip to content
This repository has been archived by the owner on May 27, 2024. It is now read-only.

Commit

Permalink
remove useless code, add github actions, update androidbinary lib, fix
Browse files Browse the repository at this point in the history
  • Loading branch information
codeskyblue committed Apr 7, 2024
1 parent 1fdd3bf commit c8da687
Show file tree
Hide file tree
Showing 7 changed files with 78 additions and 110 deletions.
27 changes: 27 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Go Test

on:
push:
branches:
- master
pull_request:
branches:
- master

jobs:
test:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: stable

- name: Run tests
run: go test -v
41 changes: 41 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# .github/workflows/release.yml
name: goreleaser

on:
pull_request:
push:
# run only against tags
tags:
- "*"

permissions:
contents: write
# packages: write
# issues: write

jobs:
goreleaser:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: stable
# More assembly might be required: Docker logins, GPG, etc.
# It all depends on your needs.
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v5
with:
# either 'goreleaser' (default) or 'goreleaser-pro'
distribution: goreleaser
# 'latest', 'nightly', or a semver
version: latest
args: release --clean
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# Your GoReleaser Pro key, if you are using the 'goreleaser-pro' distribution
# GORELEASER_KEY: ${{ secrets.GORELEASER_KEY }}
20 changes: 0 additions & 20 deletions .travis.yml

This file was deleted.

7 changes: 4 additions & 3 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ require (
github.com/kardianos/osext v0.0.0-20170510131534-ae77be60afb1 // indirect
github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51
github.com/kr/binarydist v0.1.0 // indirect
github.com/kr/pretty v0.1.0 // indirect
github.com/kr/pty v1.1.8
github.com/levigross/grequests v0.0.0-20190130132859-37c80f76a0da
github.com/mholt/archiver v2.0.1-0.20171012052341-26cf5bb32d07+incompatible
Expand All @@ -39,9 +40,9 @@ require (
github.com/prometheus/procfs v0.0.2
github.com/rs/cors v1.6.0
github.com/sevlyar/go-daemon v0.1.4
github.com/shogo82148/androidbinary v1.0.1
github.com/shurcooL/httpfs v0.0.0-20190707220628-8d4bc4ba7749 // indirect
github.com/shurcooL/vfsgen v0.0.0-20200824052919-0d455de96546 // indirect
github.com/shogo82148/androidbinary v1.0.5
github.com/shurcooL/httpfs v0.0.0-20230704072500-f1e31cf0ba5c // indirect
github.com/shurcooL/vfsgen v0.0.0-20230704071429-0000e147ea92 // indirect
github.com/sirupsen/logrus v1.6.0
github.com/stretchr/testify v1.4.0
github.com/ulikunitz/xz v0.5.5 // indirect
Expand Down
2 changes: 0 additions & 2 deletions scripts/requirements.txt

This file was deleted.

79 changes: 0 additions & 79 deletions scripts/upload2qiniu.py

This file was deleted.

12 changes: 6 additions & 6 deletions update_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@ func TestFormatString(t *testing.T) {
assert.Equal(t, s, "a x y x")
}

func TestGetLatestVersion(t *testing.T) {
version, err := getLatestVersion()
assert.NoError(t, err)
t.Logf("version: %s", version)
assert.NotEqual(t, version, "")
}
//func TestGetLatestVersion(t *testing.T) {
//version, err := getLatestVersion()
//assert.NoError(t, err)
//t.Logf("version: %s", version)
//assert.NotEqual(t, version, "")
//}

func TestGetChecksums(t *testing.T) {
maps, err := getChecksums("0.0.1")
Expand Down

0 comments on commit c8da687

Please sign in to comment.