-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4 from nhnb/setup
Setup and Distribution improvements
- Loading branch information
Showing
15 changed files
with
196 additions
and
87 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
*.pyc | ||
dist |
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 |
---|---|---|
@@ -1,31 +1,10 @@ | ||
# postsai-commitstop | ||
# Commit Stop | ||
**Manage Push Permissions** | ||
|
||
A Postsai extension that adds the capability to establish and manage commit stops through a simple web interface for both Git and CVS. | ||
*Commit Stop* allows the management of push permissions for source code repositories. | ||
|
||
For example only certain people may be allowed to commit directly to Git master. Or | ||
commits to a certain release branch are only allowed with special information in the | ||
commit message. | ||
|
||
## CVS | ||
|
||
|
||
The integration with CVS repositories is achieved via a CVS verifymsg hook. | ||
|
||
After you copied the file hooks/verifymsg.py to your CVS server, you need to edit CVSROOT/verifymsg in order to invoke it. Please note that verifymsg only supports one hook per module pattern (unlike loginfo). | ||
|
||
For example, to use the commitstop extension for all CVS modules in the current repository with a postsai server at example.com: | ||
|
||
~~~~ | ||
.* /usr/local/bin/verifymsg.py --repository=repo --url=https://example.com/postsai/extensions/commitstop/api.py --msgfile=%l | ||
~~~~ | ||
|
||
|
||
## Frontend for viewing and updating configurations | ||
|
||
|
||
The source code of the web frontend is located under the directory ./frontend. After building it with angular-cli using the command | ||
|
||
ng build -w -prod --bh "" | ||
|
||
, it can be invoked by opening the location | ||
|
||
$domain/postsai/extensions/postsai-commitstop/frontend/dist/ | ||
|
||
where $domain is the base url of the postsai installation. | ||
Please see [https://hiseg.github.io/commitstop](https://hiseg.github.com/commitstop) for details. |
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
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,30 @@ | ||
#!/bin/bash | ||
|
||
cd `dirname $0` | ||
|
||
SRCDIR=`pwd` | ||
TMPDIR=`mktemp -d` | ||
|
||
# Clean build of angular app | ||
cd frontend | ||
rm -rf dist | ||
ng build --prod --aot | ||
cd .. | ||
cp -ax . $TMPDIR/commitstop | ||
|
||
# Delete unnecessary files | ||
mv $TMPDIR/commitstop/frontend/dist $TMPDIR/ | ||
rm -rf $TMPDIR/commitstop/.git $TMPDIR/commitstop/dist.sh $TMPDIR/commitstop/frontend | ||
rm `find . -name *.pyc` | ||
mv $TMPDIR/dist $TMPDIR/commitstop/frontend | ||
|
||
# adjust relativ path because path is just "frontend" in distribution instead of "frontend/dist" | ||
export JS_FILE=`ls $TMPDIR/commitstop/frontend/main.*` | ||
sed "s|\.\./\.\./api.py|../api.py|" < $JS_FILE > $TMPDIR/t.txt | ||
mv $TMPDIR/t.txt $JS_FILE | ||
|
||
# Create .zip-file | ||
cd $TMPDIR | ||
zip -r $SRCDIR/dist/commitstop-$1.zip * | ||
cd $SRCDIR | ||
rm -rf $TMPDIR |
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
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
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
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.