oscm <a href="https://github.com/netkiller/oscm#show-current-branch"></a>展示当前分支<a href="https://github.com/netkiller/oscm#create-branch"></a>创建分支<a href="https:// 操作系统配置管理

程序名称:oscm <a href="https://github.com/netkiller/oscm#show-current-branch"></a>展示当前分支<a href="https://github.com/netkiller/oscm#create-branch"></a>创建分支<a href="https://

授权协议: MIT

操作系统: 跨平台

开发语言: Python

oscm <a href="https://github.com/netkiller/oscm#show-current-branch"></a>展示当前分支<a href="https://github.com/netkiller/oscm#create-branch"></a>创建分支<a href="https:// 介绍

oscm 是个操作系统配置管理工具。

安装

python3 setup.py sdist
$ python3 setup.py install

帮助

$ deployment 
Usage: deployment [options] stage projectOptions:
  -h, --help            show this help message and exit
  -r, --revert          revert to revision
  --backup=BACKUP       backup remote to local
  --clean

  stage:
    development | testing | production

  project:.Branch:
    branch management

    -c master|trunk, --checkout=master|trunk
                        checkout branch
    -n branch, --new=branch
                        Create new branch
    -d branch, --delete=branch
                        delete branch
    --release=RELEASE   release version exampe:2014-01-23

  Example: 
    deployment testing www.example.com
    deployment production www.example.com --clean
    deployment testing bbs.example.com --backup=/tmp/backup

  Homepage: http://netkiller.github.com Author: Neo

配置

$ cat etc/testing/example.com.ini 
[www]
;[email protected]:example.com/www.example.com
repository=https://github.com/oscm/shell.git
source=/tmp/repo
option=--delete --password-file=confure/production/example.com/passwd
exclude=testing/www.example.com.lst
logfile=/tmp/www.example.com
[email protected]
destination=example.com/www.example.com

[bbs]
repository=https://github.com/oscm/shell.git
[email protected]
destination=example.com/bbs.example.com

部署项目

$ deployment testing bbs.example.com
receiving incremental file list

sent 82 bytes  received 3228 bytes  601.82 bytes/sec
total size is 243879  speedup is 73.68

恢复

$ deployment testing www.example.com -r master  
$ deployment testing www.example.com -r b1f13fade4c069ff077ce5f26fc3cb1e3c6df902

$ deployment testing www.example.com -r 838cba5
HEAD is Now at 838cba5... Merge branch 'master' of https://github.com/oscm/linux
* (detached from 838cba5)
  master
sending incremental file list
.git/
.git/index
        7344 100%    6.34MB/s    0:00:00 (xfer#1, to-check=117/157)

sent 3230 bytes  received 148 bytes  519.69 bytes/sec
total size is 234676  speedup is 69.47

分支管理

展示当前分支

$ deployment branch testing bbs.example.com 
* master

创建分支

$ deployment branch testing bbs.example.com -n development
Switched to a new branch 'development'
$ deployment branch testing bbs.example.com -n testing
Switched to a new branch 'testing'
$ deployment branch testing bbs.example.com -n production
Switched to a new branch 'production'

$ deployment branch testing bbs.example.com 
  development
  master
* production
  testing

检验分支

$ deployment branch testing bbs.example.com -c master
HEAD is Now at f9ed461 Update 5.5.8.sh
Switched to branch 'master'

$ deployment branch testing bbs.example.com 
  development
* master
  production
  testing

删除分支

$ deployment branch testing bbs.example.com -d beat
error: Cannot delete the branch 'beat' which you are currently on.

$ deployment branch testing bbs.example.com --delete=beat
error: Cannot delete the branch 'beat' which you are currently on.

$ deployment branch testing bbs.example.com -c master
HEAD is Now at f9ed461 Update 5.5.8.sh
Switched to branch 'master'

$ deployment branch testing bbs.example.com --delete=beat
Deleted branch beat (was f9ed461).

$ deployment branch testing bbs.example.com 
* master

版本发布

$ deployment branch testing bbs.example.com --release=10.0-RELEASE
$ git tag 
10.0-RELEASE

备份

$ deployment testing bbs.example.com --backup=/tmp/backup

其他

$ deployment testing bbs.example.com --clean

oscm <a href="https://github.com/netkiller/oscm#show-current-branch"></a>展示当前分支<a href="https://github.com/netkiller/oscm#create-branch"></a>创建分支<a href="https:// 官网

http://netkiller.github.io/

相关编程语言

Pacman 是一个软件包管理器, 作为 ArchLinux 发行版...
Smb4K 是KDE下的网络共享浏览器 更多屏幕截图请看:...
Wine (“Wine Is Not an Emulator” 的首字母缩写)...
虚拟桌面软件,可管理最多9个虚拟桌面,你可以用热键...
UNetbootin (Universal Netboot Installer)为一种跨...
Cobbler 可以用来快速建立 Linux 网络安装环境,它已...