How to check out the Services layer source code
Task Description
This document explains how to download the Services layer source code from the CollectionSpace source code repository.
Prerequisites
Depending on which set of instructions you follow below:
- You will either need a basic level of experience with downloading and unzipping/expanding files from links on a web page.
or - git client software must be installed on the machine onto which you will be checking out source code, and you will need a basic level of experience with this software.
Procedure
Downloading the Services layer source code via a web link
If you plan to view or work with CollectionSpace Services source code, but don't plan to manage your changes to that code via the git
version control system, you can simply download it in this way:
To download the stable Services layer source code for a particular version of CollectionSpace, such as a version of CollectionSpace that your museum is targeting:
- Visit https://github.com/collectionspace/services/tags
- Click the link for the appropriate version; e.g.
v
for versionUnknown macro: {multi-excerpt-include}.zipUnknown macro: {multi-excerpt-include}. (Both.zip
and.tar.gz
downloads are available.) - Unzip (or otherwise expand) the downloaded file.
When you expand the downloaded file, this will create a new directory whose name will begin with services-
, followed by the relevant version number. For example, for version 4.0 ("v4.0"), this directory will be named: services-v4.0
(It is strongly recommended that you immediately rename this directory to simply services
, as some documentation may refer to it using that name. Starting with version 4.0, some installation behavior also now depends on that name.)
To download the very latest, albeit unstable (i.e. being actively worked on and thus subject to change) Services layer source code:
- Visit https://github.com/collectionspace/services
- Click the Download ZIP button.
- Unzip the downloaded file.
When you expand the downloaded file, this will create a new directory with the name services-master
(It is strongly recommended that you immediately rename this directory to simply services
, as some documentation may refer to it using that name. Starting with version 4.0, some installation behavior also now depends on that name.)
Checking out the Services layer source code via a git client
If you plan to view or work with CollectionSpace Services source code, and want to manage your changes to that code via the git
version control system, follow these steps to check out the CollectionSpace User Interface (Services) layer source code via your git client software:
- Create a directory for this source code.
- Change into that directory.
- Check out the source code from the project's source code repository using your
git
client software. - Change into the new directory that will be created as a result of your checkout.
All of the examples below use the git
command-line client. (You can also use equivalent commands in your graphical git client software.)
To check out the Services layer source code:
You will then see a newly-created services
directory. Change into this directory.
You will now be working in the "master" branch (also known as "trunk" in some equivalent version control systems). This is the very latest, albeit unstable Services layer source code.
To view (read-only) the stable Services layer source code for a particular version of CollectionSpace, such as a version of CollectionSpace that your museum is targeting:
Be sure to substitute your desired version number, such as v
, for {version_number_goes_here
} in the command above, as in this example:
To work with the stable Services layer source code for a particular version of CollectionSpace, in a newly-created local branch - a place in which you can make your own changes based on that version:
Be sure to substitute your branch name for {your_branch_name_goes_here}, and the desired version number, such as v
, for {version_number_goes_here
} in the command above, as in this example:
To view a list of available version numbers, each representing the stable Services source code ("tagged" release) for a particular version of CollectionSpace:
Test
Within the directory into which you just downloaded the Services layer source code, you should see a set of files and directories that looks much like the ones listed here:
Example for the master branch:
https://github.com/collectionspace/services
See Also
For additional information on downloading source code see the following documents
- For information on the source code repository, see Source Code Repository.
- To review how the services layer's source code is organized, see Directory structure for the Services layer source code.
- To read Javadoc documentation for the Services Layer source code, see Javadoc documentation.
- How to check out CollectionSpace's Source Code
- How to check out the Application layer source code
- How to check out the UI layer source code