Skip to content

Commit

Permalink
bug-fix: update module path and version (#1558)
Browse files Browse the repository at this point in the history
  • Loading branch information
shiqizng authored Jul 11, 2023
1 parent 61f0d13 commit 6b6be24
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 365 deletions.
8 changes: 4 additions & 4 deletions .goreleaser.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@ builds:
- arm64
ldflags: >
-s -w
-X github.com/algorand/indexer/version.Hash={{.FullCommit}}
-X github.com/algorand/indexer/version.ShortHash={{.ShortCommit}}
-X github.com/algorand/indexer/version.CompileTime={{.Timestamp}}
-X github.com/algorand/indexer/version.ReleaseVersion={{.Version}}
-X github.com/algorand/indexer/v3/version.Hash={{.FullCommit}}
-X github.com/algorand/indexer/v3/version.ShortHash={{.ShortCommit}}
-X github.com/algorand/indexer/v3/version.CompileTime={{.Timestamp}}
-X github.com/algorand/indexer/v3/version.ReleaseVersion={{.Version}}
dockers:
- use: buildx
Expand Down
1 change: 0 additions & 1 deletion .version

This file was deleted.

19 changes: 3 additions & 16 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
SRCPATH := $(shell pwd)
VERSION := $(shell $(SRCPATH)/mule/scripts/compute_build_number.sh)
OS_TYPE ?= $(shell $(SRCPATH)/mule/scripts/ostype.sh)
ARCH ?= $(shell $(SRCPATH)/mule/scripts/archtype.sh)
PKG_DIR = $(SRCPATH)/tmp/node_pkgs/$(OS_TYPE)/$(ARCH)/$(VERSION)
ifeq ($(OS_TYPE), darwin)
ifeq ($(ARCH), arm64)
export CPATH=/opt/homebrew/include
Expand All @@ -12,9 +10,9 @@ endif
export GOPATH := $(shell go env GOPATH)
GOPATH1 := $(firstword $(subst :, ,$(GOPATH)))

GOLDFLAGS += -X github.com/algorand/indexer/version.Hash=$(shell git log -n 1 --pretty="%H")
GOLDFLAGS += -X github.com/algorand/indexer/version.CompileTime=$(shell date -u +%Y-%m-%dT%H:%M:%S%z)
GOLDFLAGS += -X github.com/algorand/indexer/version.ReleaseVersion=$(shell cat .version)
GOLDFLAGS += -X github.com/algorand/indexer/v3/version.Hash=$(shell git log -n 1 --pretty="%H")
GOLDFLAGS += -X github.com/algorand/indexer/v3/version.CompileTime=$(shell date -u +%Y-%m-%dT%H:%M:%S%z)
GOLDFLAGS += -X "github.com/algorand/indexer/v3/version.ReleaseVersion=Dev Build"

COVERPKG := $(shell go list ./... | grep -v '/cmd/' | egrep -v '(testing|test|mocks)$$' | paste -s -d, - )

Expand All @@ -39,17 +37,6 @@ idb/mocks/IndexerDb.go: idb/idb.go
check:
go build ./...

package:
rm -rf $(PKG_DIR)
mkdir -p $(PKG_DIR)
misc/release.py --host-only --outdir $(PKG_DIR)

# used in travis test builds; doesn't verify that tag and .version match
fakepackage:
rm -rf $(PKG_DIR)
mkdir -p $(PKG_DIR)
misc/release.py --host-only --outdir $(PKG_DIR) --fake-release

test: idb/mocks/IndexerDb.go cmd/algorand-indexer/algorand-indexer
go test -coverpkg=$(COVERPKG) ./... -coverprofile=coverage.txt -covermode=atomic ${TEST_FLAG}

Expand Down
339 changes: 0 additions & 339 deletions misc/release.py

This file was deleted.

Loading

0 comments on commit 6b6be24

Please sign in to comment.