diff --git a/.releng.json b/.releng.json
index 705178b..4b918fe 100644
--- a/.releng.json
+++ b/.releng.json
@@ -3,5 +3,5 @@
"comment": "Created by releng v0.0.6: https://github.com/lvillani/releng",
"version": 1
},
- "version": "3.3.1"
-}
\ No newline at end of file
+ "version": "3.4.0"
+}
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 29f4d5d..c40678d 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -2,6 +2,15 @@
All notable changes to this project are documented in this file.
+## 3.4.0 - 2017-06-04
+
+### Changed
+
+* The most user-visible change should be that most stuff should be now served via TLS.
+
+
+
+
## 3.3.1 - 2017-02-09
Fixes to the CI system to produce 32-bit executables and installer packages.
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index d42053c..5d9edc8 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -1 +1 @@
-To submit or update entries, please see [here](https://github.com/just-install/registry/blob/master/README.md).
+To submit or update packages, please see [here](https://github.com/just-install/registry/blob/master/README.md).
diff --git a/README.md b/README.md
index 2d19322..cdba92f 100644
--- a/README.md
+++ b/README.md
@@ -6,7 +6,7 @@ _The simple package installer for Windows_
[![Build status](https://ci.appveyor.com/api/projects/status/wpof4badsg7y0l3s/branch/master?svg=true)](https://ci.appveyor.com/project/lvillani/just-install/branch/master)
[![License](http://img.shields.io/badge/license-GPL%203.0-blue.svg?style=flat)](http://choosealicense.com/licenses/gpl-3.0/)
-[![Semver](http://img.shields.io/badge/version-v3.3.1-blue.svg?style=flat)](https://github.com/just-install/just-install/blob/master/CHANGELOG.md)
+[![Semver](http://img.shields.io/badge/version-v3.4.0-blue.svg?style=flat)](https://github.com/just-install/just-install/blob/master/CHANGELOG.md)
[![Gitter](https://img.shields.io/gitter/room/nwjs/nw.js.svg)](https://gitter.im/just-install/support)
--------------------------------------------------------------------------------
diff --git a/Vagrantfile b/Vagrantfile
index 02d561c..0771cc4 100644
--- a/Vagrantfile
+++ b/Vagrantfile
@@ -6,9 +6,8 @@ VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.box = "modernIE/w7-ie8"
- config.vm.provision "shell", path: "bootstrap.cmd"
+ config.vm.provision "shell", path: "./script/bootstrap.cmd"
config.vm.synced_folder ".", "/gopath/src/github.com/just-install/just-install"
- config.vm.synced_folder "~/.ssh", "/Users/vagrant/Desktop/ssh"
config.vm.provider "virtualbox" do |v|
v.gui = true
diff --git a/appveyor.yml b/appveyor.yml
new file mode 100644
index 0000000..f5d4ede
--- /dev/null
+++ b/appveyor.yml
@@ -0,0 +1,17 @@
+clone_folder: C:\gopath\src\github.com\just-install\just-install
+shallow_clone: true
+test: off
+environment:
+ GOPATH: C:\gopath
+ PATH: C:\gopath\bin;%PROGRAMFILES(x86)%\WiX Toolset v3.11\bin;%PATH%
+ PYTHONUNBUFFERED: 1
+ NETLIFY_DEPLOY_TOKEN:
+ secure: JeAo8d6hrQCY73ADrmhWL0LL51VgjexXY2hX4ZxSReaPvUaV3cDOw5P+pAB3ZnIeLVKPcRshq7GwuOPBFRjqWKVnWXOvjFIkzp88Gvb6zEA=
+build_script:
+ - cmd: go get -u github.com/kardianos/govendor
+ - cmd: govendor sync
+ - cmd: pip install requests==2.17.3
+ - cmd: .\script\cibuild.py
+artifacts:
+ - path: just-install*.exe
+ - path: just-install*.msi
diff --git a/build.py b/build.py
deleted file mode 100755
index 5eb707a..0000000
--- a/build.py
+++ /dev/null
@@ -1,105 +0,0 @@
-#!/usr/bin/env python2.7
-#
-# just-install - The stupid package installer
-#
-# Copyright (C) 2013-2016 Lorenzo Villani
-#
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation, version 3 of the License.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see .
-#
-
-from __future__ import print_function
-
-import glob
-import os
-import shutil
-import sys
-from subprocess import check_output as get_output
-from subprocess import check_call
-
-HERE = os.path.dirname(__file__)
-
-if sys.platform == "win32":
- EXE = "just-install.exe"
-else:
- EXE = "just-install"
-
-
-def main():
- setup()
- clean()
- build()
-
- if sys.platform == "win32":
- build_msi()
-
- if "CI" in os.environ:
- appveyor()
-
-
-def setup():
- call("go", "get", "-u", "github.com/kardianos/govendor")
- call("govendor", "sync")
-
-
-def clean():
- def remove(*args):
- for f in args:
- try:
- os.remove(f)
- except:
- pass
-
- remove("just-install")
- remove(*glob.glob("*.exe"))
- remove(*glob.glob("*.msi"))
- remove(*glob.glob("*.wixobj"))
- remove(*glob.glob("*.wixpdb"))
-
-
-def build():
- version = get_output(["git", "describe", "--tags"])
-
- # This environment variable is used in just-install.wxs
- os.environ["JustInstallVersion"] = version[1:6]
-
- if "CI" in os.environ:
- os.environ["GOARCH"] = "386"
-
- if "--skip-tests" not in sys.argv:
- call("go", "test", "-v")
-
- call("go", "build", "-o", EXE, "-ldflags", "-X main.version={}".format(version), "./bin")
-
-
-def build_msi():
- call("candle", "just-install.wxs")
- call("light", "just-install.wixobj")
-
-
-def appveyor():
- if "APPVEYOR_REPO_TAG_NAME" not in os.environ:
- return
-
- tag = os.environ["APPVEYOR_REPO_TAG_NAME"]
-
- shutil.move("just-install.exe", "just-install-{}.exe".format(tag))
- shutil.move("just-install.msi", "just-install-{}.msi".format(tag))
-
-
-def call(*args):
- print("+", " ".join(args))
- check_call(args)
-
-
-if __name__ == "__main__":
- main()
diff --git a/just-install.wxs b/just-install.wxs
index 17c8c23..0c8ef32 100644
--- a/just-install.wxs
+++ b/just-install.wxs
@@ -1,6 +1,6 @@
-
+
@@ -15,4 +15,4 @@
-
\ No newline at end of file
+
diff --git a/bootstrap.cmd b/script/bootstrap.cmd
similarity index 100%
rename from bootstrap.cmd
rename to script/bootstrap.cmd
diff --git a/script/cibuild.py b/script/cibuild.py
new file mode 100755
index 0000000..6709f55
--- /dev/null
+++ b/script/cibuild.py
@@ -0,0 +1,120 @@
+#!/usr/bin/env python
+#
+# just-install - The stupid package installer
+#
+# Copyright (C) 2013-2016 Lorenzo Villani
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, version 3 of the License.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see .
+#
+
+from __future__ import absolute_import, division, print_function, unicode_literals
+
+import glob
+import json
+import os
+import zipfile
+from subprocess import check_call
+
+import requests
+
+HERE = os.path.dirname(__file__)
+TOP_LEVEL = os.path.abspath(os.path.join(HERE, ".."))
+
+
+def main():
+ os.chdir(TOP_LEVEL)
+
+ clean()
+ build()
+ build_msi()
+ deploy()
+
+
+def clean():
+ def remove(*args):
+ for arg in args:
+ try:
+ os.remove(arg)
+ except:
+ pass
+
+ remove("just-install")
+ remove(*glob.glob("*.exe"))
+ remove(*glob.glob("*.msi"))
+ remove(*glob.glob("*.wixobj"))
+ remove(*glob.glob("*.wixpdb"))
+
+
+def build():
+ os.environ["GOARCH"] = "386"
+
+ call(
+ "go", "build", "-o", "just-install.exe",
+ "-ldflags", "-X main.version={}".format(get_version()), "./bin")
+
+
+def build_msi():
+ if is_stable_build():
+ os.environ["JUST_INSTALL_MSI_VERSION"] = get_version()
+ else:
+ os.environ["JUST_INSTALL_MSI_VERSION"] = "255.0" # Fake MSI version for unstable builds
+
+ call("candle", "just-install.wxs")
+ call("light", "just-install.wixobj")
+
+
+def deploy():
+ target = "stable" if is_stable_build() else "unstable"
+
+ print("Deploying to {}".format(target))
+
+ # Create zip archive for API-driven deployment
+ with zipfile.ZipFile("deploy.zip", "w") as zipfileobj:
+ zipfileobj.write("just-install.exe")
+ zipfileobj.write("just-install.msi")
+ zipfileobj.writestr("_redirects", "/ /just-install.msi")
+
+ # Push zip archive to Netlify
+ deploy_url = "https://api.netlify.com/api/v1/sites/just-install-{}.netlify.com/deploys".format(
+ target)
+
+ with open("deploy.zip", "rb") as fileobj:
+ requests.post(
+ deploy_url,
+ data=fileobj,
+ headers={
+ "Authorization": "Bearer {}".format(os.environ["NETLIFY_DEPLOY_TOKEN"]),
+ "Content-Type": "application/zip",
+ },
+ timeout=60)
+
+
+def call(*args):
+ print("+", " ".join(args))
+ check_call(args)
+
+
+def get_version():
+ if is_stable_build():
+ with open(os.path.join(TOP_LEVEL, ".releng.json"), "r") as f:
+ return json.load(f)["version"]
+ else:
+ return "unstable"
+
+
+def is_stable_build():
+ return "APPVEYOR_REPO_TAG_NAME" in os.environ
+
+
+if __name__ == "__main__":
+ main()