feat(scripts): add project create and sync scripts (fixes #7)
This commit is contained in:
parent
69ec771aa0
commit
79bc4993bf
|
@ -0,0 +1,17 @@
|
|||
#! /bin/bash
|
||||
|
||||
PROJECT_NAME="${1}"
|
||||
PROJECT_PATH="${2:-${USER}}"
|
||||
|
||||
echo "Creating project ${PROJECT_NAME}..."
|
||||
mkdir ../"${PROJECT_NAME}"
|
||||
pushd ../"${PROJECT_NAME}"
|
||||
|
||||
echo "Setting up repository..."
|
||||
git init
|
||||
git remote add github git@github.com:${PROJECT_PATH}/${PROJECT_NAME}.git
|
||||
git remote add gitlab git@git.apextoaster.com:${PROJECT_PATH}/${PROJECT_NAME}.git
|
||||
|
||||
echo "Setting up template..."
|
||||
popd
|
||||
./scripts/project-update.sh "../${PROJECT_NAME}"
|
|
@ -0,0 +1,3 @@
|
|||
docs/api/
|
||||
src/app.ts
|
||||
test/TestApp.ts
|
|
@ -0,0 +1,10 @@
|
|||
#! /bin/bash
|
||||
set -x
|
||||
|
||||
PROJECT_NAME="${1}"
|
||||
|
||||
echo "Updating project: ${PROJECT_NAME}"
|
||||
git ls-tree -r HEAD --name-only | rsync -avh \
|
||||
--files-from=- \
|
||||
--exclude-from=./scripts/project-exclude \
|
||||
./ "${PROJECT_NAME}"
|
Loading…
Reference in New Issue