summaryrefslogtreecommitdiff
path: root/client/client-updates/README
blob: 56026b8582b8a11b6ad2cabebec7f72434d91c96 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
########################################
# How to use the client updates system #
########################################

# Initial setup

1. compile adler32: Run 'make' in the src directory.
2. Copy example config and edit it to your needs:
   $ cp client-updates.conf.example client-updates.conf
3. Optionally, put the client-update-{gen,news,inspect,push} in your PATH
4. Init a git repository for the client-updates dir, as zip updates will be committed.
   $ git init
   $ git add .
   $ git commit -m 'Initial scripts'

Now we have to generate the base update.
If you have already base zip files, you can include them in the release/ directory.
Fill properly the resources.xml and resources2.xml files.
Otherwise, run client-updates-gen with proper arguments.
1st arg is base commit, 2nd arg is final commit (HEAD if omitted).

# Overview
The process to manage client updates is as follows:

1. a developer needs to include new client data.
2. if not done already, he/she will set up a personal branch in the tmwa-client-data repo
   and pull what is necessary.
3. the tmwa-client-data repo has a "testing" branch which is the reference for generating the updates.
   there is also the "master" branch which is in sync with mainline.
   the developer will perform a merge in the "testing" branch, and if necessary resolve the conflicts.
4. $ client-updates-gen
   will generate if necessary a new zip and display its contents.
5. optionally, you can check the contents of the updates is correct:
   $ client-updates-inspect
   This will list the contents of all updates in a pager, from most recent to oldest.
6. $ client-updates-push
   will sync the client updates to the local webserver directory

As a general rule, never break the history of the "$CLIENT_DATA_BRANCH" branch of the tmwa-client-data repository.

# Handling news -- only useful if not using the news of the server-data.

1. $ client-updates-news
   will open the news.txt for editing.
2. Publish these changes.
   $ client-updates-push

# Details on the client-updates-gen script

This script analyses the client data repo and generates
a zip file with the files changed / added between 2 revisions.

The script will check the differences between HEAD and the latest reference commit.
The reference commit is determined by the latest entry in $UPDATES_DIR/resources2.src.txt

# Config file (client-updates.conf)

Several variables for finding the UPDATES_DIR, the client data repository,
and ftp credentials.
Find it next to client-updates-* scripts.

# Client updates repository

A local git repository is used for managing these scripts.
This repository has 2 branches: master and updates
The repository should always be left on the branch "updates": most scripts will write commits
when updates are issued or when news.txt is updated.
When you need to change things in the core scripts, change to master, commit, then rebase the "updates" branch.