Skip to content
This repository has been archived by the owner on May 13, 2020. It is now read-only.

Commit

Permalink
Release 0.1.4
Browse files Browse the repository at this point in the history
  • Loading branch information
SeanTAllen committed Jun 16, 2018
2 parents 1b33f8a + 53c8d5b commit 28a3b7e
Show file tree
Hide file tree
Showing 18 changed files with 169 additions and 26 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Expand Up @@ -2,6 +2,12 @@

All notable changes to the Pony compiler and standard library will be documented in this file. This project adheres to [Semantic Versioning](http://semver.org/) and [Keep a CHANGELOG](http://keepachangelog.com/).

## [0.1.4] - 2018-06-16

### Added

- Add support for gitlab ([PR #69](https://github.com/ponylang/pony-stable/pull/69))

## [0.1.3] - 2018-06-02

## [0.1.2] - 2018-05-25
Expand Down
9 changes: 7 additions & 2 deletions Makefile
Expand Up @@ -6,6 +6,7 @@ arch ?=
BUILD_DIR ?= build/$(config)
SRC_DIR ?= stable
binary := $(BUILD_DIR)/stable
tests_binary := $(BUILD_DIR)/test

ifdef config
ifeq (,$(filter $(config),debug release))
Expand Down Expand Up @@ -44,7 +45,11 @@ install: $(binary)
mkdir -p $(DESTDIR)$(prefix)/bin
cp $^ $(DESTDIR)$(prefix)/bin

test: $(binary)
$(tests_binary): $(GEN_FILES) $(SOURCE_FILES) | $(BUILD_DIR)
${PONYC} $(arch_arg) --debug -o ${BUILD_DIR} $(SRC_DIR)/test

test: $(tests_binary)
$^

clean:
rm -rf $(BUILD_DIR)
Expand Down Expand Up @@ -85,4 +90,4 @@ endef

$(eval $(call EXPAND_DEPLOY))

.PHONY: all clean deploy install
.PHONY: all clean deploy install test
56 changes: 42 additions & 14 deletions README.md
Expand Up @@ -10,7 +10,23 @@ Put them in a stable and make your life easier.

## Installation

### Apt-get
### Ubuntu Linux using a DEB package (via Launchpad PPA)

For Ubuntu Linux (Trusty, Xenial, Artful, Bionic, Cosmic), the `release` builds are packaged and available on Launchpad PPA ([ponylang/ponylang](https://launchpad.net/~ponylang/+archive/ubuntu/ponylang)).

To install builds via Apt:

```bash
add-apt-repository ppa:ponylang/ponylang
apt-get update
apt-get install pony-stable
```

### Debian Linux using a DEB package (via Bintray)

For Debian Linux, the `release` builds are packaged and available on Bintray ([pony-language/ponyc-debian](https://bintray.com/pony-language/ponyc-debian)).

To install builds via Apt (and install Bintray's public key):

```bash
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys "D401AB61 DBE1D0A2"
Expand All @@ -25,30 +41,42 @@ sudo apt-get -V install pony-stable
brew install pony-stable
```

### RPM
### Linux using an RPM package (via COPR)

For Red Hat, CentOS, Oracle Linux, Fedora Linux, or OpenSuSE, the `release` builds are packaged and available on COPR ([ponylang/ponylang](https://copr.fedorainfracloud.org/coprs/ponylang/ponylang/)).

#### Using `yum` for Red Hat, CentOS, Oracle Linux and other RHEL compatible systems:

```bash
yum copr enable ponylang/ponylang epel-7
yum install pony-stable
```

See https://bugzilla.redhat.com/show_bug.cgi?id=1581675 for why `epel-7` is required on the command line.

DNF:
#### Using `DNF` for Fedora Linux:

```bash
wget https://bintray.com/pony-language/pony-stable-rpm/rpm -O bintray-pony-language-pony-stable-rpm.repo
sudo mv bintray-pony-language-pony-stable-rpm.repo /etc/yum.repos.d/
sudo dnf --refresh install pony-stable
dnf copr enable ponylang/ponylang
dnf install pony-stable
```

Yum:
#### Using Zypper for OpenSuSE Leap 15:

```bash
wget https://bintray.com/pony-language/pony-stable-rpm/rpm -O bintray-pony-language-pony-stable-rpm.repo
sudo mv bintray-pony-language-pony-stable-rpm.repo /etc/yum.repos.d/
sudo yum install pony-stable
zypper addrepo --refresh --repo https://copr.fedorainfracloud.org/coprs/ponylang/ponylang/repo/opensuse-leap-15.0/ponylang-ponylang-opensuse-leap-15.0.repo
wget https://copr-be.cloud.fedoraproject.org/results/ponylang/ponylang/pubkey.gpg
rpm --import pubkey.gpg
zypper install pony-stable
```

Zypper:
#### Using Zypper for OpenSuSE Tumbleweed:

```bash
wget https://bintray.com/pony-language/pony-stable-rpm/rpm -O bintray-pony-language-pony-stable-rpm.repo
sudo mv bintray-pony-language-pony-stable-rpm.repo /etc/zypp/repos.d/
sudo zypper install pony-stable
zypper addrepo --refresh --repo https://copr.fedorainfracloud.org/coprs/ponylang/ponylang/repo/opensuse-tumbleweed/ponylang-ponylang-opensuse-tumbleweed.repo
wget https://copr-be.cloud.fedoraproject.org/results/ponylang/ponylang/pubkey.gpg
rpm --import pubkey.gpg
zypper install pony-stable
```

### Arch-Linux (AUR)
Expand Down
28 changes: 26 additions & 2 deletions RELEASE_PROCESS.md
Expand Up @@ -8,6 +8,8 @@ In order to do a release, you absolutely must have:

* Commit access to the `pony-stable` repo
* The latest release of the [changelog tool](https://github.com/ponylang/changelog-tool/releases) installed
* Access to the ponylang twitter account
* An account on reddit for posting release notes

While not strictly required, you life will be made much easier if you:

Expand Down Expand Up @@ -72,11 +74,10 @@ Leave a comment on the GitHub issue for this release letting everyone know that

During the time since you push to the release branch, Travis CI and Appveyor have been busy building release artifacts. This can take up to a couple hours depending on how busy they are. Periodically check bintray to see if the releases are there yet.

* [RPM](https://bintray.com/pony-language/pony-stable-rpm/pony-stable)
* [Debian](https://bintray.com/pony-language/pony-stable-debian/pony-stable)
* [Windows](https://bintray.com/pony-language/pony-stable-win/pony-stable)

The pattern for releases is similar as what we previously saw. In the case of RPM and Deb, the versions look something like:
The pattern for releases is similar as what we previously saw. In the case of Deb, the version looks something like:

`0.3.1`

Expand All @@ -86,6 +87,21 @@ For windows, the versions look something like:

where the `1526` is the AppVeyor build number and the `8a8ee28` is the abbreviated SHA for the commit we built from.

### Wait on COPR/PPA

The Travis CI build for the release branch kicks off packaging builds on Fedora COPR and Ubuntu Launchpad PPA. These packaging builds can take some time but are usually quick. Periodically check to see if the releases are finished and published on these site:

* [Fedora COPR](https://copr.fedorainfracloud.org/coprs/ponylang/ponylang/builds/)
* [Ubuntu Launchpad PPA](https://launchpad.net/~ponylang/+archive/ubuntu/ponylang/+packages)

The pattern for packaging release builds is similar as what we previously saw. In the case of Fedora COPR, the version looks something like:

`0.3.1-1.fc27`

The pattern for packaging release builds is similar as what we previously saw. In the case of Ubuntu Launchpad PPA, the versions looks something like:

`pony-stable - 0.3.1-0ppa1~<UBUNTU DISTRIBUTION NAME>`

### Wait on Homebrew

Periodically check on your Homebrew PR. They have a CI process and everything should flow through smoothly. If it doesn't attempt to fix the problem. If you can't fix the problem, leave a comment on the GitHub issue for this release asking for assistance.
Expand Down Expand Up @@ -114,6 +130,10 @@ Additionally, any breaking changes that require end users to change their code s

To distinguish this pony-stable release from a ponyc release, be sure to title the post: "Pony-stable 0.3.1 Released".

### Merge the release blog post PR for the ponylang website

Once all the release steps have been confirmed as successful, merge the PR you created earlier for ponylang.github.io for the blog post announcing the release. Confirm it is successfully published to the [blog](https://www.ponylang.org/blog/).

### Inform #ponylang

Once Travis, Appveyor and Homebrew are all finished, drop a note in the #ponylang IRC channel (on freenode) letting everyone know that the release is out and include a link the release blog post.
Expand All @@ -134,6 +154,10 @@ Last Week in Pony is our weekly newsletter. Add information about the release, i

Release notes should be posted to [/r/ponylang](https://www.reddit.com/r/ponylang/).

### Post release to ponylang twitter

The release should be announced on the [ponylang twitter](https://www.twitter.com/ponylang).

### Close the GitHub issue

Close the GitHub issue for this release.
2 changes: 1 addition & 1 deletion VERSION
@@ -1 +1 @@
0.1.3
0.1.4
7 changes: 4 additions & 3 deletions stable/add.pony
Expand Up @@ -7,12 +7,13 @@ primitive Add
let rest = args.slice(1)
let prim =
match kind
| "github" => AddGithub
| "github" => AddGitHosted
| "gitlab" => AddGitHosted
| "local-git" => AddLocalGit
| "local" => AddLocal
else
log("Couldn't find type '" + kind + "'.")
log("Available types are github, local-git, and local.")
log("Available types are github, gitlab, local-git, and local.")
error
end
let info: JsonObject ref = JsonObject
Expand All @@ -21,7 +22,7 @@ primitive Add

info

primitive AddGithub
primitive AddGitHosted
fun apply(args: Array[String] box, info: JsonObject) ? =>
info.data("repo") = args(0)?

Expand Down
6 changes: 6 additions & 0 deletions stable/bundle.pony
Expand Up @@ -34,6 +34,12 @@ class Bundle
+ " : " + err_message)
error
end

// ensure there's a "deps" array, dependencies aren't checked yet
try (json.data as JsonObject box).data("deps")? as JsonArray box else
log("JSON error at: " + file.path.path + ": missing \"deps\" array")
error
end
end

fun deps(): Iterator[DepAny] =>
Expand Down
12 changes: 8 additions & 4 deletions stable/dep.pony
Expand Up @@ -9,21 +9,25 @@ interface DepAny
primitive Dep
fun apply(bundle: Bundle box, info: JsonObject box): DepAny ? =>
match info.data("type")?
| "github" => DepGitHub(bundle, info)?
| "github" => DepGitHosted(bundle, info, "https://github.com/")?
| "gitlab" => DepGitHosted(bundle, info, "https://gitlab.com/")?
| "local-git" => DepLocalGit(bundle, info)?
| "local" => DepLocal(bundle, info)?
else error
end

class DepGitHub
class DepGitHosted
let bundle: Bundle box
let info: JsonObject box
let domain: String
let repo: String
let subdir: String
let git_tag: (String | None)
new create(b: Bundle box, i: JsonObject box) ? =>

new create(b: Bundle box, i: JsonObject box, d: String) ? =>
bundle = b
info = i
domain = d
repo =
try info.data("repo")? as String
else
Expand All @@ -46,7 +50,7 @@ class DepGitHub
Path.join(root_path(), subdir)

fun url(): String =>
"https://github.com/" + repo
domain + repo

fun ref fetch() ? =>
let fpath = FilePath(bundle.path, root_path())?
Expand Down
7 changes: 7 additions & 0 deletions stable/test/main.pony
@@ -0,0 +1,7 @@
use "ponytest"

actor Main is TestList
new create(env: Env) => PonyTest(env, this)

fun tag tests(test: PonyTest) =>
test(TestBundle)
51 changes: 51 additions & 0 deletions stable/test/test_bundle.pony
@@ -0,0 +1,51 @@
use "ponytest"
use "files"
use ".."

class TestBundle is UnitTest
new iso create() => None
fun name(): String => "stable.Bundle"

fun bundle(subpath: String): String =>
Path.join("stable/test/testdata", subpath).string()

fun apply(h: TestHelper) ? =>
h.assert_error(_BundleCreate(h.env, "notfound")?, "nonexistant directory")
h.assert_error(_BundleCreate(h.env, bundle("empty"))?, "no bundle.json")
h.assert_error(_BundleCreate(h.env, bundle("bad/empty"))?, "empty bundle.json")
h.assert_error(_BundleCreate(h.env, bundle("bad/wrong_format"))?, "wrong bundle.json")

h.assert_no_error(_BundleCreate(h.env, bundle("empty-deps"))?, "empty deps")
h.assert_no_error(_BundleCreate(h.env, bundle("github"))?, "github dep")
h.assert_no_error(_BundleCreate(h.env, bundle("local-git"))?, "local-git dep")
h.assert_no_error(_BundleCreate(h.env, bundle("local"))?, "local dep")

h.assert_no_error(_BundleCreate(h.env, bundle("abitofeverything"))?, "mixed deps")

h.assert_error(_BundleCreate(h.env, "notfound", true)?, "create in nonexistant directory")

h.assert_no_error(_BundleCreate(h.env, bundle("empty"), true)?, "create in directory with no bunde.json")

let file = FilePath(h.env.root as AmbientAuth, bundle("empty/bundle.json"))?
h.assert_true(file.exists(), "empty bundle.json created")
let f = OpenFile(file) as File
let content: String = f.read_string(f.size())
h.assert_eq[String]("{\"deps\":[]}\n", content)

fun tear_down(h: TestHelper) =>
let created_bundle = bundle("empty/bundle.json")
try
FilePath(h.env.root as AmbientAuth, created_bundle)?.remove()
else
h.log("failed to clean up " + created_bundle)
end

class _BundleCreate is ITest
let path: FilePath
let create_missing: Bool

new create(env': Env val, path': String, create': Bool = false) ? =>
path = FilePath(env'.root as AmbientAuth, path')?
create_missing = create'

fun apply() ? => Bundle(path, LogNone, create_missing)?
5 changes: 5 additions & 0 deletions stable/test/testdata/abitofeverything/bundle.json
@@ -0,0 +1,5 @@
{"deps":[
{"repo":"foo/bar","type":"github"},
{"local-path":"../foo","type":"local-git"},
{"local-path":"../bar","type":"local"}
]}
1 change: 1 addition & 0 deletions stable/test/testdata/bad/empty/bundle.json
@@ -0,0 +1 @@
{}
1 change: 1 addition & 0 deletions stable/test/testdata/bad/wrong_format/bundle.json
@@ -0,0 +1 @@
{"repo":"foo/bar","type":"github"}
1 change: 1 addition & 0 deletions stable/test/testdata/empty-deps/bundle.json
@@ -0,0 +1 @@
{"deps":[]}
Empty file.
1 change: 1 addition & 0 deletions stable/test/testdata/github/bundle.json
@@ -0,0 +1 @@
{"deps":[{"repo":"foo/bar","type":"github","subdir":"baz","tag":"v1"}]}
1 change: 1 addition & 0 deletions stable/test/testdata/local-git/bundle.json
@@ -0,0 +1 @@
{"deps":[{"local-path":"../foo","type":"local-git","tag":"v0"}]}
1 change: 1 addition & 0 deletions stable/test/testdata/local/bundle.json
@@ -0,0 +1 @@
{"deps":[{"local-path":"../foo","type":"local"}]}

0 comments on commit 28a3b7e

Please sign in to comment.