Skip to content

Commit

Permalink
Merge branch 'hotfix/0.9.5'
Browse files Browse the repository at this point in the history
  • Loading branch information
JeltevanBoheemen committed Jun 18, 2024
2 parents d5cdbba + c7ca4a0 commit 982a1df
Show file tree
Hide file tree
Showing 8 changed files with 59 additions and 7 deletions.
4 changes: 2 additions & 2 deletions CITATION.cff
Original file line number Diff line number Diff line change
Expand Up @@ -41,5 +41,5 @@ abstract: >-
transcripts, to aid clinical linguists and research into
language development and language disorders.
license: BSD-3-Clause
version: 0.9.4
date-released: '2024-06-11'
version: 0.9.5
date-released: '2024-06-18'
2 changes: 1 addition & 1 deletion backend/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ requests==2.28.1
# spacy
requests-oauthlib==1.3.1
# via django-allauth
sastadev==0.2.2
sastadev==0.2.3
# via
# -r requirements.in
# auchann
Expand Down
4 changes: 4 additions & 0 deletions frontend/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -49,3 +49,7 @@ Thumbs.db

# Angular
.angular/


/src/environments/environment.prod.ts
/src/environments/version.ts
39 changes: 39 additions & 0 deletions frontend/build/build-pre.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
const path = require('path');
const colors = require('colors/safe');
const fs = require('fs');

console.log(colors.cyan('\nRunning pre-build tasks'));

var appVersion;

try {
appVersion = require('../../package.json').version;
} catch {
console.warn('Could not import package.json.');
appVersion = undefined;
}

const versionFilePath = path.join(
__dirname + '/../src/environments/version.ts'
);
const src = `export const version = '${appVersion}';
`;

// ensure version module pulls value from package.json
fs.writeFile(versionFilePath, src, { flat: 'w' }, function (err) {
if (err) {
return console.log(colors.red(err));
}

console.log(
colors.green(
`Updating application version ${colors.yellow(appVersion)}`
)
);
console.log(
`${colors.green('Writing version module to ')}${colors.yellow(
versionFilePath
)}\n`
);
console.log(src);
});
3 changes: 3 additions & 0 deletions frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@
"build": "ng build --base-href=/static/",
"test": "ng test --watch=true",
"lint": "ng lint",
"prebuild": "node ./build/build-pre.js",
"pretest": "yarn prebuild",
"preserve": "yarn prebuild",
"build:en": "ng build --configuration=production-en",
"build:nl": "ng build --configuration=production-nl",
"build-git": "ng build --configuration git --aot",
Expand Down
2 changes: 0 additions & 2 deletions frontend/src/environments/version.ts

This file was deleted.

8 changes: 6 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "sasta",
"version": "0.9.4",
"version": "0.9.5",
"description": "Annotate and analyze transcripts",
"author": "UU Digital Humanities Lab",
"license": "BSD-3-Clause",
Expand Down Expand Up @@ -36,6 +36,10 @@
"static-p": "yarn build-p && yarn clean-static && yarn collectstatic-p",
"watch-front-p": "yarn front yarn watch",
"start-back-p": "cd backend && python manage.py runserver --settings production --insecure --pythonpath ..",
"start-p": "yarn static-p && yarn watch-front-p & yarn start-back-p"
"start-p": "yarn static-p && yarn watch-front-p & yarn start-back-p",
"patch": "yarn version --patch --no-commit-hooks --no-git-tag-version && yarn update-citation && yarn fyarn prebuild",
"minor": "yarn version --minor --no-commit-hooks --no-git-tag-version && yarn update-citation && yarn fyarn prebuild",
"major": "yarn version --major --no-commit-hooks --no-git-tag-version && yarn update-citation && yarn fyarn prebuild",
"update-citation": "$PWD/update-citation.sh"
}
}
4 changes: 4 additions & 0 deletions update-citation.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
version=`grep -o '\d\+\.\d\+\.\d\+' package.json`
today=`date +'%Y-%m-%d'`
sed -i '' "s/^version:.*$/version: $version/g" CITATION.cff
sed -i '' "s/^date-released:.*$/date-released: \'$today\'/g" CITATION.cff

0 comments on commit 982a1df

Please sign in to comment.