Skip to content
This repository has been archived by the owner on Jun 22, 2021. It is now read-only.

Commit

Permalink
Add project link
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolaasuni committed Oct 27, 2016
1 parent 4ff76c6 commit 6d663f4
Show file tree
Hide file tree
Showing 15 changed files with 30 additions and 26 deletions.
13 changes: 7 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,20 +12,20 @@
# Current directory
CURRENTDIR=$(shell pwd)

# Project type
# Set default project type
ifeq ($(TYPE),)
TYPE=app
endif

# Project configuration file
# Set default project configuration file
ifeq ($(CONFIG),)
CONFIG=default.cfg
endif

# include the configuration file
# Include the configuration file
include $(CONFIG)

# Prefix for environmental variables
# Generate a prefix for environmental variables
UPROJECT=$(shell echo $(PROJECT) | tr a-z A-Z | tr - _)


Expand All @@ -40,12 +40,12 @@ help:
@echo " make new TYPE=app CONFIG=myproject.cfg : Generate a new go project"
@echo " make clean : Remove all generated projects"
@echo ""
@echo " TYPE is the project type:"
@echo " * TYPE is the project type:"
@echo " lib : library"
@echo " app : command-line application"
@echo " srv : HTTP API service"
@echo ""
@echo " CONFIG is the configuration file containing the project settings."
@echo " * CONFIG is the configuration file containing the project settings."
@echo ""

# Alias for help target
Expand Down Expand Up @@ -81,6 +81,7 @@ template:
@find ./target/$(CVSPATH)/$(PROJECT)/ -type f -exec sed -i "s/~#UPROJECT#~/$(UPROJECT)/" {} \;
@find ./target/$(CVSPATH)/$(PROJECT)/ -type f -exec sed -i "s/~#SHORTDESCRIPTION#~/$(SHORTDESCRIPTION)/" {} \;
@find ./target/$(CVSPATH)/$(PROJECT)/ -type f -exec sed -i "s|~#CVSPATH#~|$(CVSPATH)|" {} \;
@find ./target/$(CVSPATH)/$(PROJECT)/ -type f -exec sed -i "s|~#PROJECTLINK#~|$(PROJECTLINK)|" {} \;
@find ./target/$(CVSPATH)/$(PROJECT)/ -type f -exec sed -i "s/~#VENDOR#~/$(VENDOR)/" {} \;
@find ./target/$(CVSPATH)/$(PROJECT)/ -type f -exec sed -i "s/~#OWNER#~/$(OWNER)/" {} \;
@find ./target/$(CVSPATH)/$(PROJECT)/ -type f -exec sed -i "s/~#OWNEREMAIL#~/$(OWNEREMAIL)/" {} \;
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.3.0
1.4.0
3 changes: 3 additions & 0 deletions default.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ SHORTDESCRIPTION=Dummy Project
# CVS project parent path
CVSPATH=github.com/dummyvendor

# Project link
PROJECTLINK=https://github.com/dummyvendor/dummy

# All lowercase project vendor name
VENDOR=dummyvendor

Expand Down
6 changes: 3 additions & 3 deletions src/app/Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# MAKEFILE
#
# @author Nicola Asuni <info@tecnick.com>
# @link https://~#CVSPATH#~/~#PROJECT#~
# @link ~#PROJECTLINK#~
# ------------------------------------------------------------------------------

# List special make targets that are not associated with files
Expand Down Expand Up @@ -138,7 +138,7 @@ all: help
test:
@mkdir -p target/test
GOPATH=$(GOPATH) \
go test -covermode=atomic -bench=. -race -v ./... | \
go test -covermode=atomic -bench=. -race -v ./src | \
tee >(PATH=$(GOPATH)/bin:$(PATH) go-junit-report > target/test/report.xml); \
test $${PIPESTATUS[0]} -eq 0

Expand All @@ -164,7 +164,7 @@ lint:
coverage:
@mkdir -p target/report
GOPATH=$(GOPATH) \
go test -covermode=count -coverprofile=target/report/coverage.out -v ./... && \
go test -covermode=count -coverprofile=target/report/coverage.out -v ./src && \
GOPATH=$(GOPATH) \
go tool cover -html=target/report/coverage.out -o target/report/coverage.html

Expand Down
2 changes: 1 addition & 1 deletion src/app/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* **category** Application
* **copyright** ~#CURRENTYEAR#~ ~#OWNER#~
* **license** see [LICENSE](LICENSE)
* **link** https://~#CVSPATH#~/~#PROJECT#~
* **link** ~#PROJECTLINK#~


## Description
Expand Down
2 changes: 1 addition & 1 deletion src/app/resources/debian/changelog
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
~#PKGNAME#~ (~#VERSION#~-~#RELEASE#~) UNRELEASED; urgency=low

* Please check the
https://~#CVSPATH#~/~#PROJECT#~
~#PROJECTLINK#~
commit history

-- ~#VENDOR#~ <~#OWNEREMAIL#~> ~#DATE#~
4 changes: 2 additions & 2 deletions src/app/resources/debian/control
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ Section: utils
Priority: optional
Build-Depends: debhelper (>= 9), dh-golang
Standards-Version: 3.9.7
Homepage: https://~#CVSPATH#~/~#PROJECT#~
Vcs-Git: https://~#CVSPATH#~/~#PROJECT#~.git
Homepage: ~#PROJECTLINK#~
Vcs-Git: ~#PROJECTLINK#~.git

Package: ~#PKGNAME#~
Provides: ~#PROJECT#~
Expand Down
2 changes: 1 addition & 1 deletion src/app/resources/debian/copyright
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Upstream-Name: ~#PROJECT#~
Upstream-Contact: ~#OWNER#~ <~#OWNEREMAIL#~>
Source: https://~#CVSPATH#~/~#PROJECT#~
Source: ~#PROJECTLINK#~

Files: *
Copyright: Copyright ~#CURRENTYEAR#~ ~#OWNER#~ <~#OWNEREMAIL#~>
Expand Down
4 changes: 2 additions & 2 deletions src/lib/Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# MAKEFILE
#
# @author Nicola Asuni <info@tecnick.com>
# @link https://~#CVSPATH#~/~#PROJECT#~
# @link ~#PROJECTLINK#~
# ------------------------------------------------------------------------------

# List special make targets that are not associated with files
Expand Down Expand Up @@ -162,7 +162,7 @@ lint:
coverage:
@mkdir -p target/report
GOPATH=$(GOPATH) \
go test -covermode=count -coverprofile=target/report/coverage.out && \
go test -covermode=count -coverprofile=target/report/coverage.out -v ./... && \
GOPATH=$(GOPATH) \
go tool cover -html=target/report/coverage.out -o target/report/coverage.html

Expand Down
2 changes: 1 addition & 1 deletion src/lib/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* **category** Library
* **copyright** ~#CURRENTYEAR#~ ~#OWNER#~
* **license** see [LICENSE](LICENSE)
* **link** https://~#CVSPATH#~/~#PROJECT#~
* **link** ~#PROJECTLINK#~


## Description
Expand Down
6 changes: 3 additions & 3 deletions src/srv/Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# MAKEFILE
#
# @author Nicola Asuni <info@tecnick.com>
# @link https://~#CVSPATH#~/~#PROJECT#~
# @link ~#PROJECTLINK#~
# ------------------------------------------------------------------------------

# List special make targets that are not associated with files
Expand Down Expand Up @@ -144,7 +144,7 @@ all: help
test:
@mkdir -p target/test
GOPATH=$(GOPATH) \
go test -covermode=atomic -bench=. -race -v ./... | \
go test -covermode=atomic -bench=. -race -v ./src | \
tee >(PATH=$(GOPATH)/bin:$(PATH) go-junit-report > target/test/report.xml); \
test $${PIPESTATUS[0]} -eq 0

Expand All @@ -170,7 +170,7 @@ lint:
coverage:
@mkdir -p target/report
GOPATH=$(GOPATH) \
go test -covermode=count -coverprofile=target/report/coverage.out -v ./... && \
go test -covermode=count -coverprofile=target/report/coverage.out -v ./src && \
GOPATH=$(GOPATH) \
go tool cover -html=target/report/coverage.out -o target/report/coverage.html

Expand Down
2 changes: 1 addition & 1 deletion src/srv/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* **category** Application
* **copyright** ~#CURRENTYEAR#~ ~#OWNER#~
* **license** see [LICENSE](LICENSE)
* **link** https://~#CVSPATH#~/~#PROJECT#~
* **link** ~#PROJECTLINK#~


## Description
Expand Down
2 changes: 1 addition & 1 deletion src/srv/resources/debian/changelog
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
~#PKGNAME#~ (~#VERSION#~-~#RELEASE#~) UNRELEASED; urgency=low

* Please check the
https://~#CVSPATH#~/~#PROJECT#~
~#PROJECTLINK#~
commit history

-- ~#VENDOR#~ <~#OWNEREMAIL#~> ~#DATE#~
4 changes: 2 additions & 2 deletions src/srv/resources/debian/control
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ Section: utils
Priority: optional
Build-Depends: debhelper (>= 9), dh-golang
Standards-Version: 3.9.7
Homepage: https://~#CVSPATH#~/~#PROJECT#~
Vcs-Git: https://~#CVSPATH#~/~#PROJECT#~.git
Homepage: ~#PROJECTLINK#~
Vcs-Git: ~#PROJECTLINK#~.git

Package: ~#PKGNAME#~
Provides: ~#PROJECT#~
Expand Down
2 changes: 1 addition & 1 deletion src/srv/resources/debian/copyright
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Upstream-Name: ~#PROJECT#~
Upstream-Contact: ~#OWNER#~ <~#OWNEREMAIL#~>
Source: https://~#CVSPATH#~/~#PROJECT#~
Source: ~#PROJECTLINK#~

Files: *
Copyright: Copyright ~#CURRENTYEAR#~ ~#OWNER#~ <~#OWNEREMAIL#~>
Expand Down

0 comments on commit 6d663f4

Please sign in to comment.