Skip to content

Commit

Permalink
Update CCI
Browse files Browse the repository at this point in the history
  • Loading branch information
tejohnso committed Jun 19, 2018
1 parent 5e88fc8 commit 611d9f5
Show file tree
Hide file tree
Showing 2 changed files with 57 additions and 16 deletions.
69 changes: 53 additions & 16 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,9 @@
defaults: &defaults
working_directory: ~/workspace
docker:
- image: snapcore/snapcraft

version: 2
jobs:
build:
<<: *defaults
working_directory: ~/workspace
docker:
- image: snapcore/snapcraft
steps:
- checkout
- run:
Expand All @@ -31,8 +28,10 @@ jobs:
root: ~/workspace
paths: ['*.snap', 'VERSION']

release:
<<: *defaults
release_snap:
working_directory: ~/workspace
docker:
- image: snapcore/snapcraft
steps:
- checkout

Expand All @@ -49,23 +48,45 @@ jobs:
command: snapcraft login --with credentials

- run:
name: Create github release
name: Push/release snap
command: |
curl -vv -H "content-type: application/json" --data-binary '{"tag_name":"$(cat VERSION)"}' -u tejohnso:$GITHUB_TOKEN https://api.github.com/repos/tejohnso/dictionary-filter/releases
if git tag --contains |grep edge; then snapcraft push *.snap --release edge; fi
if git tag --contains |grep stable; then snapcraft push *.snap --release stable; fi
release_github:
working_directory: ~/workspace
docker:
- image: circleci/buildpack-deps
steps:
- checkout

- attach_workspace:
at: ~/workspace

- run:
name: Push/release snap
name: Create github release
command: |
set +e
git tag --contains |grep edge && snapcraft push *.snap --release edge
git tag --contains |grep stable && snapcraft push *.snap --release stable
curl -vv -H "content-type: application/json" --data-binary "{\"tag_name\":\"$(cat VERSION)\"}" -u tejohnso:$GITHUB_TOKEN https://api.github.com/repos/tejohnso/dictionary-filter/releases 2>&1 |grep "201 Created"
release_aur:
working_directory: ~/workspace
docker:
- image: circleci/buildpack-deps
steps:
- checkout

- attach_workspace:
at: ~/workspace

- run:
name: Update AUR
command: |
cd /tmp
echo -n $AUR_FINGERPRINT |base64 -d >> ~/.ssh/known_hosts
git clone ssh://aur@aur.archlinux.org/fdic.git
cd fdic
git config user.name "$AUR_USER_NAME"
git config user.email "$AUR_USER_EMAIL"
sed -i "s/[0-9]\.[0-9]\.[0-9]/$(cat ~/workspace/VERSION)/g" .SRCINFO
sed -i "s/pkgver=.*/pkgver=$(cat ~/workspace/VERSION)/" PKGBUILD
git add .
Expand All @@ -82,5 +103,21 @@ workflows:
ignore: /.*/
tags:
only: /stage|edge/
- release:
requires: [build]
- release_snap:
filters:
tags:
only: /stage|edge/
requires:
- build
- release_aur:
filters:
tags:
only: /stage|edge/
requires:
- build
- release_github:
filters:
tags:
only: /stage|edge/
requires:
- build
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.

## [Unreleased]

## [1.0.4] - 2018-06-18
### Added
- Include AUR publishing

## [1.0.2] - 2018-06-15
### Added
- Included CHANGELOG
Expand Down

0 comments on commit 611d9f5

Please sign in to comment.