UNPKG

6.75 kBMarkdownView Raw
1These instructions tell you how to create a new release of the
2Ground2Cloud product, including packages for both the Windows G2C
3Client(s) and Linux G2C server. Also included are means to create the
4new "release" downloads on the g2c-releases repo, and notify clients by
5creating an empty pull-request, whose Highlights will be included on the
6next client notification email.
7
8This walkthrough assumes that you are roughly familiar with how
9Ground2Cloud works, and that you have checked out all 4 petit
10repositories ([petit](https://github.com/cloud-elements/petit/),
11[petit-gui](https://github.com/cloud-elements/petit-gui/),
12[petit-linux](https://github.com/cloud-elements/petit-linux/), and
13[petit-windows](https://github.com/cloud-elements/petit-windows/)), as
14well as the Ground2Cloud release repo
15([g2c-releases](https://github.com/cloud-elements/g2c-releases/)). The
16walkthrough refers to the local path to these repos as (i.e.)
17`/path/to/petit`, `/path/to/petit-gui` etc. You need write access to the
18repos, and must have pulled the latest version(s) and made any local
19changes that you wish to publish.
20
21There are two types of releases here: the normal unbranded Ground2Cloud
22release, and a customer-specific "branded imprint". Instructions for
23both are presented here.
24
25## To release a new unbranded version:
26
27* Checkout the `master` branch in the petit, petit-gui, petit-linux, and
28 petit-windows repos.
29
30* Bump version numbers of petit (in `package.json`), petit-gui (also
31 `package.json`), petit-linux (`resources/deb-src/DEBIAN/control`), and
32 petit-windows (`resources/install*`, both for "define MyAppVersion"
33 and in the "CompareVersion" argument of "[Code]:InitializeSetup").
34 Remove any `displayVersion` properties.
35
36* If you want, you can update the package dependencies for petit, by
37 changing the `dependencies` property in the petit and petit-gui
38 `package.json`, then `npm update` in those repos. (`npm install
39 --save-exact` might help here.)
40
41* If you upgraded the electron version, you should also use
42 `electron-download` to download the correct windows versions:
43
44 sudo -H npm install -g electron-download
45 cd /path/to/petit-windows
46 elec_vers=<whatever>
47 for a in x86 x64 ; do
48 arch=$a
49 if [ $a == 'x86' ] ; then arch='ia32' ; fi
50 rm -rf arch/$a/node_modules/electron-prebuilt
51 cp -R /path/to/petit-gui/node_modules/electron-prebuilt \
52 arch/$a/node_modules
53 pushd arch/$a/node_modules/electron-prebuilt
54 cat > path2.txt <<< 'dist/electron.exe' # for win32 only
55 tr -d '\n' < path2.txt > path.txt
56 rm path2.txt
57 pushd dist
58 rm -rf *
59 electron-download --version=$elec_vers --platform=win32 --arch=$arch
60 ar=electron-v$elec_vers-win32-$arch.zip
61 cp $HOME/.electron/$ar .
62 unzip $ar
63 rm $ar
64 popd
65 popd
66 done
67
68* Build petit with `node setup`.
69
70* Switch to petit-gui and install petit with `npm install --save
71 /path/to/petit`.
72
73* Build petit-gui with `node setup`.
74
75* Switch to petit-linux and install petit with
76
77 cd program
78 rm -rf node_modules
79 npm install /path/to/petit
80
81* Build petit-linux (see its README), creating a
82 `resources/petitserver*.deb` file.
83
84* Switch to petit-windows and install petit and petit-gui with
85
86 rm -rf node_modules
87 npm install /path/to/petit
88 npm install /path/to/petit-gui
89 rm -rf node_modules/.bin
90
91* Build petit-windows (see its README), creating one or more
92 `Ground2Cloud*Setup.exe` files.
93
94* Test that everything works.
95
96* Reset the `dependencies.cloudelements-petit` property to "latest" in
97 `petit-gui/package.json`, reverting the `--save` operation from
98 earlier.
99
100* Commit and tag the repos with the new version (i.e. `git tag -a 1.2.3 -m
101 "Release 1.2.3"`).
102
103* Publish only the petit repo via NPM (`npm publish`).
104
105* Create and push an empty commit in the g2c-releases repo (to keep the
106 release tags in the correct chronology) with e.g. `git commit
107 --allow-empty -m 'Release v1.2.3'`).
108
109* Create a new release in g2c-releases following these instructions:
110 https://help.github.com/articles/creating-releases/, uploading all the
111 `*.deb` and `*.exe` files created earlier. Use a tag name like
112 `v1.2.3`.
113
114* Create an empty commit / branch in soba. e.g.
115
116 git checkout -b g2c-release develop
117 git commit --allow-empty -m 'Add G2C release note'
118 git push -u origin g2c-release
119
120* Create an empty pull request in soba to merge in the new branch, and
121 include the text "Released Ground2Cloud version v1.2.3 at
122 https://github.com/cloud-elements/g2c-releases/releases/latest" in the
123 Customer Highlights section. Assign to Travis.
124
125## To release a new branded imprint:
126
127A "branded imprint" is the normal Ground2Cloud client installer and
128application, but with various portions (such as logos, color, text,
129titles, version numbers, etc.) swapped out with customer assets, in
130order to make it more consistent in look and feel with that customer's
131other products.
132
133An imprint has the same operational code as the Ground2Cloud version it
134is based off, and communicates with the server as that version would.
135
136To create an imprint, follow the unbranded instructions above, with the
137following exceptions:
138
139* Checkout or create the brand branch--usually named after the customer
140 (e.g. `swiftpage`)--in the petit, petit-gui, and petit-windows repos.
141
142* Merge everything from master to the brand branch.
143
144* Create or copy branding changes (logos, text, etc) on that branch.
145
146* In the `[client.vitae]` section of the petit-window's
147 `resources/config*.toml` files, make sure that the "brand" property is
148 set correctly. (e.g. `brand = "swiftpage"`)
149
150* Keep the core G2C version (e.g. 1.2.3) in petit and petit-gui's
151 `version` property (in `package.json`), but use the branded version
152 (e.g. 1.0.1 for swiftpage) for the `displayVersion` property, and in
153 petit-windows's `resources/install*`.
154
155* When tagging, Don't use the unbranded tag: use a tag that contains the
156 customer name and version (`git tag -a swiftpage-1.0.1 -m "Release
157 1.0.1 for Swiftpage"`).
158
159* *Don't* publish the petit repo in NPM.
160
161* You don't need to create a `petitserver.deb` file out of the
162 petit-linux repo: brands apply to client-side apps only.
163
164* Neither create a separate release on the g2c-releases site, nor
165 upload the branded `*.exe` files; branded releases should be
166 distributed only to that customer. (Currently, I use a shared google
167 docs folder to distribute the files.)
168
169* Don't create a commit or pull request in soba: notify the customer
170 directly that their new G2C imprint is ready.
171