Skip to content
Snippets Groups Projects
Unverified Commit 2e8f2a2e authored by Kali Kaneko's avatar Kali Kaneko
Browse files

[pkg] modify version gen to read static version file

this can be used from any build script to distinguish the version string
that will be displayed (ie: 0.21.2-debian-1)

- Resolves: #468
parent eba7fe9f
No related branches found
No related tags found
No related merge requests found
......@@ -21,6 +21,8 @@ lib/*
qtbuild/*
providers/assets
debian/files
.*.swp
*.exe
......
riseup-vpn (0.21.2.1) groovy; urgency=medium
riseup-vpn (0.21.2.2) groovy; urgency=medium
* Initial Release.
......
ppa howto
=========
* Add changes to changelog (bump native dot-version, change release)
* Upload changes file
.. code:: bash
debuild -i -S
dput --force ppa:kalikaneko/ppa ../riseup-vpn_0.21.2.2_source.changes
how to make a release
Release procedure
=====================
1. Tag the release
2. Build the latest builder image:
1. Bump the static release file in `pkg/version`. After a release, this should read something like `0.21.2+git`. This file is used to generate version strings from tarballs.
2. Tag the release
3. Build the latest builder image:
```
make builder_image
......@@ -18,13 +20,7 @@ make package_snap_in_docker
4. Build the windows installer:
This is a bit complicated, since it is a two-stage build. It will need you have
cloned the secrets folder containing the windows authenticode. You also have to
have wine (32 bits) installed in your host machine.
```
make package_win_in_docker
```
(TBD)
5. Build the OSX package:
......
......@@ -3,6 +3,7 @@ package main
import (
"flag"
"io"
"io/ioutil"
"log"
"os"
"os/exec"
......@@ -43,7 +44,7 @@ func main() {
vers, err := GitDescribe(dir)
if err != nil {
log.Fatal(err)
vers = ReadVersionFile(dir)
}
vp := VersionPackage{
Name: *flPackageName,
......@@ -70,7 +71,7 @@ var packageLayout = `package {{.Name}}
// AUTO-GENERATED. DO NOT EDIT
// {{.Date}}
// {{.Variable}} is generated by git-describe from gen.go
// {{.Variable}} is generated by git-describe or static version file from gen.go
var {{.Variable}} = "{{.Version}}"
`
......@@ -93,3 +94,12 @@ func GitDescribe(path string) (string, error) {
return strings.TrimSpace(string(buf)), nil
}
func ReadVersionFile(path string) string {
versionFile := filepath.Join(path, "../../../version")
content, err := ioutil.ReadFile(versionFile)
if err != nil {
return "unknown"
}
return strings.Trim(string(content), "\n")
}
0.21.2+git
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment