-
Notifications
You must be signed in to change notification settings - Fork 0
/
.sample-projects
executable file
·147 lines (144 loc) · 6.25 KB
/
.sample-projects
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
################################################################################
# Copyright 2012-2018 Mike Dreves
#
# All rights reserved. This program and the accompanying materials
# are made available under the terms of the Eclipse Public License v1.0
# which accompanies this distribution, and is available at:
#
# http://opensource.org/licenses/eclipse-1.0.php
#
# By using this software in any fashion, you are agreeing to be bound
# by the terms of this license. You must not remove this notice, or any
# other, from this software. Unless required by applicable law or agreed
# to in writing, software distributed under the License is distributed
# on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
# either express or implied.
################################################################################
################################################################################
# Project settings
#
# This file is read from .projuxrc to configure project specific settings. Both
# per project environment variables and per project aliases can be configured.
# Entries are grouped per project (e.g. git project directory). The PROJECT_NAME
# environment variable should be first in the list. All vars/aliases after this
# setting and before the next PROJECT_NAME setting will updated whenever the
# 'projux <project>' command is called with a name matching the project name.
# See .projuxrc for information on the special key/value format used with
# project windows, selectable commands, and commands based on file types.
#
# Example:
#
# Basic settings:
# PROJECT_NAME=foo
# PROJECT_HOST=mybuild-machine # Project specific tmux host
# PROJECT_WINDOWS="vim::zsh repl::scala" # Project specific tmux wins
# PROJECT_DIR=${HOME}/Workspace/${PROJECT_NAME} # Root project dir
# PROJECT_SRC_DIR=${PROJECT_DIR}/src # Where to find source
# PROJECT_TEST_DIR=${PROJECT_DIR}/test # Where to find tests
# PROJECT_TARGET_DIR=${PROJECT_DIR}/bazel-out # Where to find/put output
# PROJECT_BIN_DIR=${PROJECT_DIR}/bazel-bin # Where to find/put exe
# PROJECT_GEN_DIR=${PROJECT_DIR}/bazel-genfiles # Where to find/put gen source
# PROJECT_PKGS="com/example1 com/example2" # Dirs in src/test with files
# PROJECT_INCLUDE_FILTER=*.{cc,h}:*.scala:*java # Files in pkgs to include
# PROJECT_EXCLUDE_FILTER="*tmp/*:*backup/*" # Files/dirs to exclude
# PROJECT_BUG=555555 # Bug associated with project
#
# Selectable commands:
# PROJECT_RUN_CMDS="client::client --flags server::server --port=1234"
# PROJECT_PACKAGE_CMDS="jar::jar ${PROJECT_TARGET_DIR}/classes"
# PROJECT_DEPLOY_CMDS="ant deploy"
# PROJECT_GENDOCS_CMDS="sbt doc"
# PROJECT_SEARCH_CMDS="my_search"
#
# Commands Based on File Type (typically set via DEFAULT_XXX in .bashrc):
# PROJECT_FORMAT_CMDS="cc:h::clang-format <targtes> go::gofmt <targets>"
# PROJECT_LINT_CMDS="go::golint <targets>;govet <targets> py::plint <targets>"
# PROJECT_BUILD_CMDS="scala::scalac java::javac"
# PROJECT_TEST_CMDS="scala::sbt test"
# PROJECT_COVERAGE_CMDS="rb::rake coverage"
# PROJECT_TEST_SUFFIXES="cc:_test"
#
# Custom Command Implementations (not needed if use PROJECT_XXX_CMDS)
# PROJECT_FORMAT_FN=my_format
# PROJECT_LINT_FN=my_lint
# PROJECT_BUILD_FN=my_build
# PROJECT_TEST_FN=my_test
# PROJECT_COVERAGE_FN=my_coverage
# PROJECT_GETERRORS_FN=my_geterrors
# PROJECT_GETURL_FN=my_geturl
# PROJECT_SANITY_FN=my_sanity
#
# Per project backup/sync settings (typically defaulted in .bashrc):
# PROJECT_SHARE_DIR=~/Public/${PROJECT_NAME}
# PROJECT_BACKUP_DIR=~/backups/${PROJECT_NAME}
# PROJECT_SYNC_LIST=~/.projectsync
# PROJECT_SYNC_DESTs=~
#
# In some cases, if a project variable is not set directly here a default
# value can be assigned from DEFAULT_XXX enviornment vars that can be
# pre-configured in .bashrc. The following vars support defaults:
#
# DEFAULT_PROJECT_HOST (built-in default is $(hostname))
# DEFAULT_PROJECT_WINDOWS (built-in default is "vim::bash build::bash")
# DEFAULT_PROJECT_SHARE_DIR (built-in default is "~/Public/<project_name>")
# DEFAULT_PROJECT_BACKUP_DIR (built-in default is "~/backups/<project_name>")
# DEFAULT_PROJECT_SYNC_LIST (built-in default is "~/projectsync")
# DEFAULT_PROJECT_SYNC_DESTS (built-in default is "~")
# DEFAULT_PROJECT_INCLUDE_FILTER
# DEFAULT_PROJECT_EXCLUDE_FILTER
# DEFAULT_PROJECT_FORMAT_CMDS
# DEFAULT_PROJECT_LINT_CMDS
# DEFAULT_PROJECT_BUILD_CMDS
# DEFAULT_PROJECT_TEST_CMDS
# DEFAULT_PROJECT_TEST_SUFFIXES
# DEFAULT_PROJECT_COVERAGE_CMDS
# DEFAULT_PROJECT_RUN_CMDS
# DEFAULT_PROJECT_PACKAGE_CMDS
# DEFAULT_PROJECT_DEPLOY_CMDS
# DEFAULT_PROJECT_GENDOCS_CMDS
# DEFAULT_PROJECT_SEARCH_CMDS
# DEFAULT_PROJECT_FORMAT_FN
# DEFAULT_PROJECT_LINT_FN
# DEFAULT_PROJECT_BUILD_FN
# DEFAULT_PROJECT_TEST_FN
# DEFAULT_PROJECT_COVERAGE_FN
# DEFAULT_PROJECT_GETERRORS_FN
# DEFAULT_PROJECT_GETURL_FN
# DEFAULT_PROJECT_SANITY_FN
#
# Normally all the XX_FN variables will be set once in .bashrc via the
# DEFAULT version to customize all settings to given build environment.
# See .sample-bashrc for examples.
# example1
PROJECT_NAME=example1
PROJECT_HOST=mybuild-machine
PROJECT_WINDOWS="vim::bash build::bash repl::python"
PROJECT_INCLUDE_FILTER=*.py
PROJECT_DIR=${HOME}/Workspace/${PROJECT_NAME}
PROJECT_SRC_DIR=${PROJECT_DIR}
PROJECT_TEST_DIR=${PROJECT_SRC_DIR}
PROJECT_TEST_SUFFIXES=py::_test
PROJECT_TARGET_DIR=${PROJECT_DIR}/bazel-out
PROJECT_BIN_DIR=${PROJECT_DIR}/bazel-bin/${PROJECT_NAME}
PROJECT_GEN_DIR=${PROJECT_DIR}/bazel-genfiles
PROJECT_PKGS=example1
PROJECT_DEFAULT_RUN_CMDS="python example1.py --my_flag=xxx"
PROJECT_BUG=5678
alias gitsync="cd ${PROJECT_DIR}; git pull"
# example2
PROJECT_NAME=example2
PROJECT_HOST=mybuild-machine
PROJECT_WINDOWS="vim::bash build::bash repl::scala"
PROJECT_INCLUDE_FILTER=*.scala:*java
PROJECT_DIR=${HOME}/Workspace/${PROJECT_NAME}
PROJECT_SRC_DIR=${PROJECT_DIR}/src
PROJECT_TEST_DIR=${PROJECT_DIR}/test
PROJECT_TARGET_DIR=${PROJECT_DIR}/target
PROJECT_BIN_DIR=${PROJECT_TARGET_DIR}/bin
PROJECT_PKGS="com/example1 com/example2"
PROJECT_DEFAULT_RUN_CMDS="\
client::client -log_dir=log -server=localhost:54321 \
server::server -port=54321"
PROJECT_BUG=1234
alias start="startup_script"
alias stop="stop_script"