-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
64 changed files
with
1,748 additions
and
706 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
{ | ||
// Use IntelliSense to learn about possible attributes. | ||
// Hover to view descriptions of existing attributes. | ||
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 | ||
"version": "0.2.0", | ||
"configurations": [ | ||
|
||
{ | ||
"name": "Launch program (dev)", | ||
"type": "go", | ||
"request": "launch", | ||
"mode": "exec", | ||
"program": "${workspaceFolder}/gorsync", | ||
"preLaunchTask": "Build program DEV", | ||
}, | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
{ | ||
// See https://go.microsoft.com/fwlink/?LinkId=733558 | ||
// for the documentation about the tasks.json format | ||
"version": "2.0.0", | ||
"tasks": [ | ||
{ | ||
"label": "Build program DEV", | ||
"type": "shell", | ||
"command": "${workspaceFolder}/gorsync_build.sh", | ||
"options": { | ||
"env": { | ||
"GOPATH": "${config:go.gopath}" | ||
}, | ||
"cwd": "${workspaceFolder}" | ||
} | ||
}, | ||
{ | ||
"label": "Build program PROD", | ||
"type": "shell", | ||
"command": "${workspaceFolder}/gorsync_build.sh --buildtype Release", | ||
"options": { | ||
"env": { | ||
"GOPATH": "${config:go.gopath}" | ||
}, | ||
"cwd": "${workspaceFolder}" | ||
} | ||
}, | ||
{ | ||
"label": "Create archive package (with sources)", | ||
"type": "shell", | ||
"command": "${workspaceFolder}/packaging/build_packages/create_archive_source_package.sh", | ||
"options": { | ||
"env": { | ||
"GOPATH": "${config:go.gopath}" | ||
}, | ||
"cwd": "${workspaceFolder}/packaging/build_packages" | ||
} | ||
}, | ||
{ | ||
"label": "Create installation packages (archlinux, redhat, debian, freebsd)", | ||
"type": "shell", | ||
"command": "${workspaceFolder}/packaging/build_packages/create_distrib_packages_with_fpm.sh", | ||
"options": { | ||
"env": { | ||
"GOPATH": "${config:go.gopath}" | ||
}, | ||
"cwd": "${workspaceFolder}/packaging/build_packages" | ||
} | ||
} | ||
], | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
# Find absolute path where Makedef resides with no difference how | ||
# make utility is started (by current path, either with -C option). | ||
mkfile_path := $(abspath $(lastword $(MAKEFILE_LIST))) | ||
# Take directories part path from absolute path to Makedef file. | ||
mkfile_dir := $(dir $(mkfile_path)) | ||
current_dir := $(notdir $(patsubst %/,%,$(dir $(mkfile_path)))) | ||
GOCMD=go | ||
GOCLEAN=$(GOCMD) clean | ||
GOTEST=$(GOCMD) test | ||
BINARY_NAME=gorsync | ||
# Always reassign GOPATH here, because Makedef is used not only here, but in source archive file | ||
# compile mode too. Move up by 4 folders from current dir to setup GOPATH as a point | ||
# to root folder where src, bin, pkg folders are resided. | ||
GOBUILD=eval 'GOPATH=$(mkfile_dir)../../../.. ./gorsync_build.sh --buildtype Release --output $(PWD)/$(BINARY_NAME)' | ||
# GOBUILD=eval 'GOPATH=$(PWD) ./gorsync_build.sh --buildtype Release' | ||
|
||
all: build | ||
|
||
# Used for some debugging only. | ||
print: | ||
$(eval GOPATH=$(shell bash -c 'echo ${PWD%/*/*/*}')) | ||
echo $(GOPATH) | ||
$(eval GOPATH=$(shell bash -c "echo ${PWD}")) | ||
echo $(GOPATH) | ||
echo ../..$(GOPATH) | ||
# echo '${PWD%/*/*/*}' | ||
|
||
# Main build entry | ||
build: | ||
$(GOBUILD) | ||
|
||
# Delete application binary from current folder and from $GOPATH/bin (if present). | ||
clean: | ||
$(GOCLEAN) | ||
rm -f $(BINARY_NAME) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.