Skip to content

Commit 27b68a0

Browse files
author
R. S. Doiel
committed
Quick Save
1 parent 7afe26c commit 27b68a0

File tree

7 files changed

+90
-6
lines changed

7 files changed

+90
-6
lines changed

Makefile

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,8 +105,8 @@ refresh:
105105
git fetch origin
106106
git pull origin $(BRANCH)
107107

108-
#publish: build website .FORCE
109-
# ./publish.bash
108+
publish: build website .FORCE
109+
./publish.bash
110110

111111
clean:
112112
@if [ -f version.go ]; then rm version.go; fi
@@ -201,6 +201,7 @@ distribute_docs:
201201
@for DNAME in $(DOCS); do cp -vR $$DNAME dist/; done
202202

203203
release: build installer.sh save setup_dist distribute_docs dist/Linux-x86_64 dist/Linux-aarch64 dist/macOS-x86_64 dist/macOS-arm64 dist/Windows-x86_64 dist/Windows-arm64 dist/Linux-armv7l
204+
printf "\n\trun ./release.bash\n\n"
204205

205206

206207
.FORCE:

articlefetch.1.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
%articlefetch(1) user manual | version 0.0.1 0a05b3a
1+
%articlefetch(1) user manual | version 0.0.1 7afe26c
22
% R. S. Doiel
33
% 2025-10-24
44

installer.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/usr/bin/env pwsh
2-
# generated with CMTools 0.0.1 0a05b3a
2+
# generated with CMTools 0.0.1 7afe26c
33

44
#
55
# Set the package name and version to install

installer.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/bin/sh
2-
# generated with CMTools 0.0.1 0a05b3a
2+
# generated with CMTools 0.0.1 7afe26c
33

44
#
55
# Set the package name and version to install

publish.bash

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
#!/bin/bash
2+
# generated with CMTools 0.0.1 7afe26c
3+
#
4+
5+
#
6+
# Publish script for articlefetch for GitHub pages. It expect the gh-pages
7+
# branch to already exist.
8+
#
9+
10+
WORKING_BRANCH=$(git branch | grep -E "\* " | cut -d \ -f 2)
11+
if [ "${WORKING_BRANCH}" = "gh-pages" ]; then
12+
git commit -am "publishing to gh-pages branch"
13+
git push origin gh-pages
14+
else
15+
echo "You're in ${WORKING_BRANCH} branch"
16+
echo "You need to pull in changes to the gh-pages branch to publish"
17+
# shellcheck disable=SC2162
18+
read -p "process Y/n " YES_NO
19+
if [ "${YES_NO}" = "Y" ] || [ "${YES_NO}" = "y" ]; then
20+
echo "Committing and pushing to ${WORKING_BRANCH}"
21+
git commit -am "commiting to ${WORKING_BRANCH}"
22+
git push origin "${WORKING_BRANCH}"
23+
echo "Changing branchs from ${WORKING_BRANCH} to gh-pages"
24+
git checkout gh-pages
25+
echo "Merging changes from origin gh-pages"
26+
git pull origin gh-pages
27+
git commit -am "merging origin gh-pages"
28+
echo "Pulling changes from ${WORKING_BRANCH} info gh-pages"
29+
git pull origin "${WORKING_BRANCH}"
30+
echo "Merging changes from ${WORKING_BRANCH}"
31+
git commit -am "merging ${WORKING_BRANCH} with gh-pages"
32+
echo "Pushing changes up and publishing"
33+
git push origin gh-pages
34+
echo "Changing back to your working branch ${WORKING_BRANCH}"
35+
git checkout "${WORKING_BRANCH}"
36+
fi
37+
fi

release.bash

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
#!/bin/bash
2+
# generated with CMTools 0.0.1 7afe26c
3+
4+
#
5+
# Release script for articlefetch on GitHub using gh cli.
6+
#
7+
# shellcheck disable=SC2046
8+
REPO_ID="$(basename $(pwd))"
9+
# shellcheck disable=SC2046
10+
GROUP_ID="$(basename $(dirname $(pwd)))"
11+
REPO_URL="https://github.com/${GROUP_ID}/${REPO_ID}"
12+
echo "REPO_URL -> ${REPO_URL}"
13+
14+
#
15+
# Generate a new draft release jq and gh
16+
#
17+
RELEASE_TAG="v$(jq -r .version codemeta.json)"
18+
RELEASE_NOTES="$(jq -r .releaseNotes codemeta.json | tr '\`' "'" | tr '\n' ' ')"
19+
echo "tag: ${RELEASE_TAG}, notes:"
20+
jq -r .releaseNotes codemeta.json >release_notes.tmp
21+
cat release_notes.tmp
22+
23+
# Now we're ready to push things.
24+
# shellcheck disable=SC2162
25+
read -r -p "Push release to GitHub with gh? (y/N) " YES_NO
26+
if [ "$YES_NO" = "y" ]; then
27+
make save msg="prep for ${RELEASE_TAG}, ${RELEASE_NOTES}"
28+
# Now generate a draft release
29+
echo "Pushing release ${RELEASE_TAG} to GitHub"
30+
gh release create "${RELEASE_TAG}" \
31+
--draft \
32+
-F release_notes.tmp \
33+
--generate-notes
34+
echo "Uploading distribution files"
35+
gh release upload "${RELEASE_TAG}" dist/*.zip
36+
37+
cat <<EOT
38+
39+
Now goto repo release and finalize draft.
40+
41+
${REPO_URL}/releases
42+
43+
EOT
44+
rm release_notes.tmp
45+
46+
fi

version.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ const (
1212
ReleaseDate = "2025-10-24"
1313

1414
// ReleaseHash, the Git hash when version.go was generated
15-
ReleaseHash = "0a05b3a"
15+
ReleaseHash = "7afe26c"
1616
LicenseText = `
1717
1818
Copyright (c) 2025, Caltech

0 commit comments

Comments
 (0)