v0.3.1: hotfix in json parsing
continuous-integration/drone/push Build is passing Details
continuous-integration/drone/tag Build is passing Details

This commit is contained in:
Cadey Ratio 2020-06-12 07:55:24 -04:00
parent 17a35e6480
commit 927bbcd4d7
7 changed files with 40 additions and 33 deletions

View File

@ -2,11 +2,6 @@ kind: pipeline
name: tests/release
steps:
- name: fetch tags
image: alpine/git
commands:
- git fetch --tags
- name: rust tests
image: "rust:1"
pull: always
@ -16,8 +11,18 @@ steps:
event:
- push
- name: fetch tags
image: alpine/git
commands:
- git fetch --tags
when:
event:
- push
branch:
- master
- name: auto-release
image: xena/gitea-release:0.3.0
image: xena/gitea-release:0.3.1
settings:
auth_username: cadey
default_branch: master

View File

@ -6,6 +6,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## Unreleased
## 0.3.1
Hotfix in json parsing
## 0.3.0
Allows for a customizable default branch name for the drone plugin using either
@ -15,7 +19,7 @@ need to hard-code your default branch name, add the config like this:
```yaml
- name: auto-release
image: xena/gitea-release:0.3.0
image: xena/gitea-release:0.3.1
settings:
auth_username: cadey
default_branch: trunk

2
Cargo.lock generated
View File

@ -326,7 +326,7 @@ dependencies = [
[[package]]
name = "gitea-release"
version = "0.3.0"
version = "0.3.1"
dependencies = [
"anyhow",
"byte-unit",

View File

@ -1,6 +1,6 @@
[package]
name = "gitea-release"
version = "0.3.0"
version = "0.3.1"
authors = ["Christine Dodrill <me@christine.website>"]
edition = "2018"

View File

@ -30,7 +30,7 @@ To use this as a drone plugin, add the following to your `.drone.yml` under the
```yaml
- name: auto-release
image: xena/gitea-release:0.2.7
image: xena/gitea-release:0.3.1
settings:
auth_username: cadey
changelog_path: ./CHANGELOG.md
@ -59,6 +59,26 @@ by adding this before your auto-release step:
- git fetch --tags
```
The default branch will automatically be derived from the Gitea API. If you need
to hard-code your default branch name for some reason, add the `default_branch`
setting like this:
```yaml
- name: auto-release
image: xena/gitea-release:0.3.1
settings:
auth_username: cadey
default_branch: trunk
gitea_server: https://tulpa.dev
gitea_token:
from_secret: GITEA_TOKEN
when:
event:
- push
branch:
- trunk
```
## CHANGELOG.md and VERSION files
The `CHANGELOG.md` file is based on the [Keep a Changelog][kacl] format, but

View File

@ -1 +1 @@
0.3.0
0.3.1

View File

@ -129,8 +129,6 @@ pub struct Repo {
pub default_branch: String,
pub description: String,
pub empty: bool,
pub external_tracker: ExternalTracker,
pub external_wiki: ExternalWiki,
pub fork: bool,
pub forks_count: i64,
pub full_name: String,
@ -140,7 +138,6 @@ pub struct Repo {
pub html_url: String,
pub id: i64,
pub ignore_whitespace_conflicts: bool,
pub internal_tracker: InternalTracker,
pub mirror: bool,
pub name: String,
pub open_issues_count: i64,
@ -174,25 +171,6 @@ pub(crate) async fn get_repo(
.await?)
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct ExternalTracker {
pub external_tracker_format: String,
pub external_tracker_style: String,
pub external_tracker_url: String,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct ExternalWiki {
pub external_wiki_url: String,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct InternalTracker {
pub allow_only_contributors_to_track_time: bool,
pub enable_issue_dependencies: bool,
pub enable_time_tracker: bool,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct Owner {
pub avatar_url: String,