UNPKG

6.91 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. Npm now uses symlinks with
76 local folders, which can't be installed. Instead, use a pack pipe:
77
78 cd program
79 rm -rf node_modules
80 npm install $(npm pack path/to/petit | tail -1)
81
82* Build petit-linux (see its README), creating a
83 `resources/petitserver*.deb` file.
84
85* Switch to petit-windows and install petit and petit-gui with
86
87 rm -rf node_modules
88 npm install $(npm pack path/to/petit | tail -1)
89 npm install $(npm pack path/to/petit-gui | tail -1)
90 rm -rf node_modules/.bin
91
92* Build petit-windows (see its README), creating one or more
93 `Ground2Cloud*Setup.exe` files.
94
95* Test that everything works.
96
97* Reset the `dependencies.cloudelements-petit` property to "latest" in
98 `petit-gui/package.json`, reverting the `--save` operation from
99 earlier.
100
101* Commit and tag the repos with the new version (i.e. `git tag -a 1.2.3 -m
102 "Release 1.2.3"`).
103
104* Publish only the petit repo via NPM (`npm publish`).
105
106* Create and push an empty commit in the g2c-releases repo (to keep the
107 release tags in the correct chronology) with e.g. `git commit
108 --allow-empty -m 'Release v1.2.3'`).
109
110* Create a new release in g2c-releases following these instructions:
111 https://help.github.com/articles/creating-releases/, uploading all the
112 `*.deb` and `*.exe` files created earlier. Use a tag name like
113 `v1.2.3`.
114
115* Create an empty commit / branch in soba. e.g.
116
117 git checkout -b g2c-release develop
118 git commit --allow-empty -m 'Add G2C release note'
119 git push -u origin g2c-release
120
121* Create an empty pull request in soba to merge in the new branch, and
122 include the text "Released Ground2Cloud version v1.2.3 at
123 https://github.com/cloud-elements/g2c-releases/releases/latest" in the
124 Customer Highlights section. Assign to Travis.
125
126## To release a new branded imprint:
127
128A "branded imprint" is the normal Ground2Cloud client installer and
129application, but with various portions (such as logos, color, text,
130titles, version numbers, etc.) swapped out with customer assets, in
131order to make it more consistent in look and feel with that customer's
132other products.
133
134An imprint has the same operational code as the Ground2Cloud version it
135is based off, and communicates with the server as that version would.
136
137To create an imprint, follow the unbranded instructions above, with the
138following exceptions:
139
140* Checkout or create the brand branch--usually named after the customer
141 (e.g. `swiftpage`)--in the petit, petit-gui, and petit-windows repos.
142
143* Merge everything from master to the brand branch.
144
145* Create or copy branding changes (logos, text, etc) on that branch.
146
147* In the `[client.vitae]` section of the petit-window's
148 `resources/config*.toml` files, make sure that the "brand" property is
149 set correctly. (e.g. `brand = "swiftpage"`)
150
151* Keep the core G2C version (e.g. 1.2.3) in petit and petit-gui's
152 `version` property (in `package.json`), but use the branded version
153 (e.g. 1.0.1 for swiftpage) for the `displayVersion` property, and in
154 petit-windows's `resources/install*`.
155
156* When tagging, Don't use the unbranded tag: use a tag that contains the
157 customer name and version (`git tag -a swiftpage-1.0.1 -m "Release
158 1.0.1 for Swiftpage"`).
159
160* *Don't* publish the petit repo in NPM.
161
162* You don't need to create a `petitserver.deb` file out of the
163 petit-linux repo: brands apply to client-side apps only.
164
165* Neither create a separate release on the g2c-releases site, nor
166 upload the branded `*.exe` files; branded releases should be
167 distributed only to that customer. (Currently, I use a shared google
168 docs folder to distribute the files.)
169
170* Don't create a commit or pull request in soba: notify the customer
171 directly that their new G2C imprint is ready.
172