Skip to content
This repository has been archived by the owner on Nov 12, 2022. It is now read-only.

Commit

Permalink
Version 0.2.3
Browse files Browse the repository at this point in the history
  • Loading branch information
sbaerlocher authored Aug 20, 2019
2 parents d04f077 + 0a982ef commit ef1860c
Show file tree
Hide file tree
Showing 10 changed files with 139 additions and 3 deletions.
6 changes: 5 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,11 @@ and [human-readable changelog](https://keepachangelog.com/en/1.0.0/).

### Added

- Add to the list the version with underlined by a dot to be replaced
- Replace underlines in version numbers by a dot

### Changed

- Changed text of the new update message

## 0.2.2

Expand Down
22 changes: 22 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,28 @@

Chocomilk is an autoupdater for Chocolatey Packages. The tool is built with Ansible and runs in the common CI Piplines.

## Installation

### Local

To use chocomilk it is sufficient to use a common Linux distribution and copy the Makefile ui and install Ansible.

### travis-ci

How chocomilk can be used in travis-ci is [documented here](https://itigoag.github.io/chocomilk/#/ci/travis-ci).

### gitlab-ci

How chocomilk can be used in gitlab-ci is [documented here](https://itigoag.github.io/chocomilk/#/ci/gitlab-ci).

## Configuration

Each repository of a Chocoalatey package has a .milk file that contains the information necessary to update a package.

[documented here](https://itigoag.github.io/chocomilk/#/milk).

## Contributors

## Credits

- Images by [macrovector / Freepik](http://www.freepik.co)
6 changes: 6 additions & 0 deletions docs/_coverpage.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
![logo](_images/chocomilk.jpg)

> Autoupdate for [Chocolatey](https://chocolatey.org) Package.
[GitHub](https://github.com/itigoag/chocomilk)
[Getting Started](#Chocomilk)
9 changes: 9 additions & 0 deletions docs/_sidebar.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
- [Home](/)
- [milk](/milk)

- CI

- [travis-ci](/ci/travis-ci)
- [gitlab-ci](/ci/gitlab-ci)

- [Changelog](changelog)
26 changes: 26 additions & 0 deletions docs/ci/travis-ci.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# travis ci

## example

```yml
language: python
python: 3.6
services: docker

install:
- pip install ansible
- wget https://raw.githubusercontent.com/itigoag/chocomilk/develop/Makefile -O ../Makefile

before_script:
- ansible --version
- cd ../
- make before

script:
- make play

notifications:
email:
on_success: never
on_failure: always
```
1 change: 0 additions & 1 deletion docs/ci/travis.md

This file was deleted.

4 changes: 4 additions & 0 deletions docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,10 @@
basePath: '/',
homepage:
'https://raw.githubusercontent.com/itigoag/chocomilk/master/README.md',
alias: {
'/changelog':
'https://raw.githubusercontent.com/itigoag/chocomilk/master/CHANGELOG.md'
},
auto2top: true,
maxLevel: 3,
subMaxLevel: 3
Expand Down
55 changes: 55 additions & 0 deletions docs/milk.md
Original file line number Diff line number Diff line change
@@ -1 +1,56 @@
# milk

## configuration

### changelog

## example

```yml
# chocomilk vars

# Package Changelog
changelog: 'https://helpx.adobe.com/acrobat/release-note/release-notes-acrobat-reader.html'

# Regex for Version
versions_prefix: '20'
version: "{{ register_changelog.content |
regex_search('DC.*\\([0-9.]+\\)') |
regex_search('\\d+.\\d+.\\d+\\b')
}}"

# Download URL
url: "http://ftp.adobe.com/pub/adobe/reader/win/AcrobatDC/{{ version | regex_replace('\\.', '') }}/AcroRdrDCUpd{{ version | regex_replace('\\.', '') }}_MUI.msp"

searchreplace:
'tools/chocolateyinstall.ps1':
- regwxp: (^\s*[$]*MUImspURL\s*=\s*)('.*')
replace: "$MUImspURL = '{{ url }}'"
- regwxp: (^\s*[$]*MUImspChecksum\s*=\s*)('.*')
replace: "$MUImspChecksum = '{{ file_hash }}'"
- regwxp: (^\s*[$]*checksumPackage64\s*=\s*)('.*')
replace: '$checksumPackage64 = "{{ file64_hash | default() }}"'

# readme to description
readme:
start: 7
end: 48

# deploy
deploy:
- provider: chocolatey
repository: 'https://push.chocolatey.org/'
key: "{{ lookup('env','CHOCOLATEY_ORG_API_KEY') }}"
- provider: github
name: 'itigo-bot'
email: 'chocomilk@itigo.ch'
url: github.com/itigoag/chocolatey.adobe-acrobat-reader-dc.git
key: "{{ lookup('env','GITHUB_API_KEY') }}"

# Notification
notifications:
- provider: mattermost
url: 'https://matters.example.com'
key: "{{ lookup('env','MATTERMOST_API_KEY') }}"
channel: 'software-packages'
```
3 changes: 2 additions & 1 deletion notifications/mattermost.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
mattermost:
url: '{{ loop_notifications.url }}'
api_key: '{{ loop_notifications.key }}'
text: '{{ package_id }} has been updated to version {{ version }}'
text: |
"{{ package_title }} has been updated from version [{{ current_version }}](https://img.shields.io/badge/{{ current_version }}-inactive) to version [{{ available_version }}](https://img.shields.io/badge/{{ available_version }}-green)."
channel: '{{ loop_notifications.channel }}'
username: 'chocomilk'
icon_url: 'https://cdn.jsdelivr.net/gh/itigoag/chocomilk@master/docs/_images/chocomilk.jpg'
Expand Down
10 changes: 10 additions & 0 deletions play.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,15 @@
content: text
register: register_package_id

- name: 'Search package title'
xml:
path: '{{ register_nuspec_file.files[0].path }}'
namespaces:
ns: 'http://schemas.microsoft.com/packaging/2015/06/nuspec.xsd'
xpath: /ns:package/ns:metadata/ns:title
content: text
register: register_package_title

- name: 'Search pre-tasks file'
find:
paths: '{{ register_package_directory.files[0].path }}/.milk'
Expand All @@ -80,6 +89,7 @@
path_milk: '{{ register_milk_path.files[0].path }}'
path_readme: '{{ register_readme_path.files[0].path }}'
package_id: '{{ register_package_id.matches[0]["{http://schemas.microsoft.com/packaging/2015/06/nuspec.xsd}id"] }}'
package_title: '{{ register_package_title.matches[0]["{http://schemas.microsoft.com/packaging/2015/06/nuspec.xsd}title"] }}'
path_pretasks: '{{ register_pretasks_path.files[0].path | default(omit) }}'
path_aftertasks: '{{ register_aftertasks_path.files[0].path | default(omit) }}'

Expand Down

0 comments on commit ef1860c

Please sign in to comment.