Difference between revisions of "ABF Console Client"

From Rosalab Wiki
Jump to: navigation, search
Line 36: Line 36:
 
Options:
 
Options:
  
* '''-b <branch_name>''' specify a branch to check out inside a cloned git pepository.
+
* '''-b <branch_name>''': specify a branch to check out inside a cloned git pepository.
  
 
Notes:
 
Notes:
Line 46: Line 46:
  
 
Options:  
 
Options:  
* '''-m/--message <message>'''  With this option specified, "git add --all", "git commit -m <message>" and "git push" will be executed.
+
* '''-m/--message <message>''': With this option specified, "git add --all", "git commit -m <message>" and "git push" will be executed.
* '''-s/--minimal-file-size <size>''' The minimal file size to upload to File-Store. Smaller files will not be processed. Default is 0B.
+
* '''-s/--minimal-file-size <size>''': The minimal file size to upload to File-Store. Smaller files will not be processed. Default is 0B.
* '''-n/--do-not-remove-files'''  By default files are being removed on uploading. Override this behavior.
+
* '''-n/--do-not-remove-files''': By default files are being removed on uploading. Override this behavior.
  
 
==store==
 
==store==
Line 57: Line 57:
 
Options:
 
Options:
  
* '''<path> ''' A path to file to upload.
+
* '''<path>''': A path to file to upload.
  
  
Line 65: Line 65:
 
Options:
 
Options:
  
* '''-o/--only <file_name>''' Limit the list of downloaded files to this file name(s). This option can be specified more than once.
+
* '''-o/--only <file_name>''': Limit the list of downloaded files to this file name(s). This option can be specified more than once.
  
 
==show==
 
==show==
Show some general information. Bash autocomplete uses it.
+
Show some general information about the project. Bash autocomplete uses it. If you are in a git repository directory, command will show information about this project (unless -p/--project specified).
  
 +
Options:
 +
 +
* '''<target>''': What has to be displayed. Available choices: build-repos, build-platforms, save-to-repos, save-to-platforms
 +
* '''-p/--project <project_name>''': Project to show information about. If you are in a git repository, the information for <project_name> will be displayed instead.
 +
 +
Notes:
 +
 +
Repository name includes its platform name. Example of repository name: "rosa2012.1/main" - repository "main" of "rosa2012.1" platform.
 +
 +
Build repository - repository that you can connect to a building chroot.
 +
 +
Target (or save-to) repository - when a build task completed successfully, packages can be published to this repository.
  
 
==locate==
 
==locate==

Revision as of 17:35, 11 April 2013

Intro

Command List

help

If you want to get a help for some command - you've got two options: abf help <command> and abf <command> -h/--help

alias

Manage aliases for console client. With aliases you can make your frequently used commands shorter.

For example, you are going to work only with packages for rosa2012., you have to checkout to this branch after every "abf get" (or use -b rosa2012.1). But you can just add an alias like "g: get -b rosa2012.1" and after that "abf g" will do it automatically.

Moreover, the alias name can be not only the first abf argument. For example, you can create another useful alias like "pack: rosa2012.1 build_branch -p" and run "abf copy pack" to copy contents of rosa2012.1 branch to build_branch and compress it.

list

List all the currently available aliases. By default this list looks like

        b: build
       sp: search projects
       su: search users
       st: status
        s: store
      spl: search platforms
       sg: search groups

add

Add a new alias. the first argument is an alias name, all the arguments after that are alias target. For example, abf alias add sg search groups will срфтпу every call of "abf sg rosa" to "abf search groups rosa".

remove

Remove an alias. The only option is an alias name.

get

Clone a remote git repository by its group and name. For example, abf get import/gcc will clone a project gcc from group import.

Options:

  • -b <branch_name>: specify a branch to check out inside a cloned git pepository.

Notes:

You can omit a group name, your default group (given from configs) will be used.

put

Upload binary files to File-Store and update (or create) .abf.yml file. Can also commit and push changes.

Options:

  • -m/--message <message>: With this option specified, "git add --all", "git commit -m <message>" and "git push" will be executed.
  • -s/--minimal-file-size <size>: The minimal file size to upload to File-Store. Smaller files will not be processed. Default is 0B.
  • -n/--do-not-remove-files: By default files are being removed on uploading. Override this behavior.

store

Upload a given file to File-Store. Prints a sha1 hash or error message (with non-zero return code).

If the file with same hash already presents on File-Store, it will not be reuploaded. In any case, file hash will be printed.

Options:

  • <path>: A path to file to upload.


fetch

Download all the files listed in .abf.yml from File-Store to local directory.

Options:

  • -o/--only <file_name>: Limit the list of downloaded files to this file name(s). This option can be specified more than once.

show

Show some general information about the project. Bash autocomplete uses it. If you are in a git repository directory, command will show information about this project (unless -p/--project specified).

Options:

  • <target>: What has to be displayed. Available choices: build-repos, build-platforms, save-to-repos, save-to-platforms
  • -p/--project <project_name>: Project to show information about. If you are in a git repository, the information for <project_name> will be displayed instead.

Notes:

Repository name includes its platform name. Example of repository name: "rosa2012.1/main" - repository "main" of "rosa2012.1" platform.

Build repository - repository that you can connect to a building chroot.

Target (or save-to) repository - when a build task completed successfully, packages can be published to this repository.

locate

Tool can remember the project location and use it for some reasons (abfcd, etc.).

build

Initiate a build task on ABF.

mock-urpm

Build a project locally using mock-urpm.

rpmbuild

Build a project locally using rpmbuild.

publish

Publish the task that have already been built.

copy

status

clean

Analyze spec file and show missing and unnecessary files from the current git repository directory.

search

test