Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Combined: indexer-tlc and clone-existing-directory #74

Merged
merged 30 commits into from
Dec 8, 2024
Merged
Changes from 1 commit
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
f2cc2ce
Sort releases by python version
jhunkeler Nov 14, 2024
a9d9753
Break down indexer into independent source files
jhunkeler Nov 18, 2024
e4e16a4
Disable "No data" row for now
jhunkeler Nov 18, 2024
93ad037
pip_packages now accepts name[extra1,extra2]==version strings
jhunkeler Nov 21, 2024
9173fe4
Add basic unindent function
jhunkeler Nov 22, 2024
ff4e8b2
Unindent script
jhunkeler Nov 22, 2024
5062698
Unindent script_setup
jhunkeler Nov 22, 2024
080866e
Add DELIVERY_[NOT_]FOUND defines
jhunkeler Dec 3, 2024
cc6458b
Fix error message wording
jhunkeler Dec 3, 2024
38e4789
Simplify delivery_exists() function
jhunkeler Dec 3, 2024
d18249a
Use delivery_series_sync() function
jhunkeler Dec 3, 2024
9098abc
delivery_exists() returns DELIVERY_NOT_FOUND by default
jhunkeler Dec 3, 2024
5796ce9
Add ability to use artifactory without uploading any artifacts at the…
jhunkeler Dec 3, 2024
2a15ece
Fix segfault in join_ex
jhunkeler Dec 6, 2024
a2bcfc3
Fix listdir()
jhunkeler Dec 6, 2024
4c3d47f
Fix irritating CSS defaults
jhunkeler Dec 6, 2024
bef4faf
Check whether arch and platform are populated before accessing them
jhunkeler Dec 6, 2024
3336bb1
Move pandoc code into its own function pandoc_exec()
jhunkeler Dec 6, 2024
9788c4f
Scan the directories listed in `dirs` instead of just the delivery di…
jhunkeler Dec 6, 2024
4da928c
Take the basename of the file immediately from the StrList item
jhunkeler Dec 6, 2024
47b0eb0
Export pandoc_exec()
jhunkeler Dec 6, 2024
0c18b5b
Fix pointers to Delivery struct
jhunkeler Dec 6, 2024
41c76e0
Improved markdown output and presentation
jhunkeler Dec 6, 2024
c2fd3e8
The indexer now installs conda into ~/.stasis/indexer/conda instead o…
jhunkeler Dec 6, 2024
b72ea77
get_files: empty pattern becomes '*'
jhunkeler Dec 7, 2024
83bd300
indexer_junitxml_report: Toggle no_printable_data instead of incremen…
jhunkeler Dec 7, 2024
3ae9311
Add get_docker_images() helper function
jhunkeler Dec 7, 2024
3475952
Initialize docker artifact directory
jhunkeler Dec 7, 2024
b677e21
Show current release followed by all available releases
jhunkeler Dec 7, 2024
4c403d1
Remove dead code
jhunkeler Dec 7, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Add basic unindent function
jhunkeler committed Dec 4, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
commit 9173fe4a472500b3f87780d116ff7a54d4729c78
2 changes: 2 additions & 0 deletions include/str.h
Original file line number Diff line number Diff line change
@@ -308,4 +308,6 @@ char *tolower_s(char *s);
*/
char *to_short_version(const char *s);

void unindent(char *s);

#endif //STASIS_STR_H
25 changes: 25 additions & 0 deletions src/lib/core/str.c
Original file line number Diff line number Diff line change
@@ -649,3 +649,28 @@ char *to_short_version(const char *s) {
strchrdel(result, ".");
return result;
}

void unindent(char *s) {
char *pos = NULL;
size_t leading_spaces;

// Set position to beginning of string
pos = s;

while (pos != NULL) {
const size_t len = strlen(s);
for (leading_spaces = 0; isspace(pos[leading_spaces]); leading_spaces++) {}

// For each new line strip an indent
if (leading_spaces >= 4 && len >= 4) {
leading_spaces = 4; // remove first level of indentation
memmove(pos, pos + leading_spaces, len - leading_spaces);
pos[len - leading_spaces] = '\0';
}

pos = strchr(pos, '\n');
if (pos && strlen(pos)) {
pos++;
}
}
}