Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
williamboman committed Jul 5, 2019
1 parent 0ce55b5 commit 7a3a229
Show file tree
Hide file tree
Showing 5 changed files with 31 additions and 3 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# Changelog

## 3.1.0-rc.1 (2019-07-05)
- Bump [`thelounge`][1] to [`3.1.0-rc.1`](https://github.com/thelounge/thelounge/releases/tag/v3.1.0-rc.1).

## 3.1.0-pre.3 (2019-06-28)
- Bump [`thelounge`][1] to [`v3.1.0-pre.3`](https://github.com/thelounge/thelounge/releases/tag/v3.1.0-pre.3).

Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@ CMD ["thelounge", "start"]
COPY docker-entrypoint.sh /usr/local/bin/docker-entrypoint.sh

# Install thelounge.
ARG THELOUNGE_VERSION=3.1.0-pre.3
ARG THELOUNGE_VERSION=3.1.0-rc.1
RUN yarn --non-interactive --frozen-lockfile global add thelounge@${THELOUNGE_VERSION} && \
yarn --non-interactive cache clean
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
THELOUNGE_VERSION?=3.1.0-pre.3
THELOUNGE_VERSION?=3.1.0-rc.1
ORGANISATION?=thelounge

all: main alpine
Expand Down
2 changes: 1 addition & 1 deletion alpine/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@ CMD ["thelounge", "start"]
COPY docker-entrypoint.sh /usr/local/bin/docker-entrypoint.sh

# Install thelounge.
ARG THELOUNGE_VERSION=3.1.0-pre.3
ARG THELOUNGE_VERSION=3.1.0-rc.1
RUN yarn --non-interactive --frozen-lockfile global add thelounge@${THELOUNGE_VERSION} && \
yarn --non-interactive cache clean
25 changes: 25 additions & 0 deletions update-version.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#!/bin/bash

NEW_VERSION="$1"

replace_regex_in_file() {
local REGEX="$1"
shift 1
local FILES=$@
for file in $FILES; do
sed -i -E "s/${REGEX}/\1${NEW_VERSION}/" "$file"
done
}

changelog_text() {
cat <<EOF
## ${NEW_VERSION} ($(date +%Y-%m-%d))
- Bump [\`thelounge\`][1] to [\`${NEW_VERSION}\`](https://github.com/thelounge/thelounge/releases/tag/v${NEW_VERSION}).
EOF
}

replace_regex_in_file "(THELOUNGE_VERSION\?=).*$" Makefile
replace_regex_in_file "(ARG THELOUNGE_VERSION=).*$" alpine/Dockerfile Dockerfile

(echo 2a; changelog_text; echo .; echo w) | ed - CHANGELOG.md

0 comments on commit 7a3a229

Please sign in to comment.